The Easiest Way to Get SPDR Gold MiniShares (GLDM) - Per Ounce Historical Rates Using API Access
The Easiest Way to Get SPDR Gold MiniShares (GLDM) - Per Ounce Historical Rates Using API Access
In the realm of precious metals trading, obtaining accurate and timely data is crucial for making informed investment decisions. For those interested in SPDR Gold MiniShares (GLDM), accessing historical prices can be simplified through the use of the Metals-API. This powerful tool provides developers with the ability to retrieve real-time and historical data on gold and other metals, enabling them to build sophisticated applications that can analyze market trends and make predictions based on historical performance.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and its value is influenced by various factors including market demand, geopolitical events, and economic indicators. With the digital transformation in precious metals trading, data analytics and market insights have become essential for traders and investors alike. The integration of technology in trading has paved the way for innovative price discovery methods, allowing for more accurate valuations and investment strategies. Digital asset solutions are now at the forefront of this evolution, providing users with real-time access to critical data.
API Description
The Metals-API is designed to empower developers by providing them with real-time metals data that can be utilized in various applications. This API offers a range of endpoints that allow users to access the latest rates, historical data, and even perform currency conversions. By leveraging the capabilities of the Metals-API, developers can create next-generation applications that enhance trading strategies and improve decision-making processes.
For more information, visit the Metals-API Website or check out the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs in the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or even every 10 minutes.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019 by appending a specific date to the API request. This is particularly useful for analyzing trends over time.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing.
- Convert Endpoint: This endpoint enables users to convert amounts from one currency to another, facilitating transactions across different currencies.
- Time-Series Endpoint: Users can query for daily historical rates between two specified dates, allowing for in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information on how metal prices fluctuate on a day-to-day basis, which is essential for understanding market volatility.
- Carat Endpoint: Users can retrieve gold rates by carat, which is particularly useful for jewelers and those in the jewelry industry.
- Lowest/Highest Price Endpoint: This feature allows users to query for the lowest and highest prices within a specified date range.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for specific time periods, which is crucial for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a comprehensive view of market trends.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API includes 14 different endpoints, each designed to provide specific functionalities.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols. For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
To illustrate how the Metals-API works, let's explore some example endpoints and their responses.
Latest Rates Endpoint
The Latest Rates Endpoint allows users to get real-time exchange rates for all available metals. Here’s an example response:
{
"success": true,
"timestamp": 1776794881,
"base": "USD",
"date": "2026-04-21",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744,
"XCU": 0.294118,
"XAL": 0.434783,
"XNI": 0.142857,
"XZN": 0.344828
},
"unit": "per troy ounce"
}
In this response, the "rates" object contains the exchange rates for various metals, with "XAU" representing gold.
Historical Rates Endpoint
Accessing historical exchange rates is straightforward. Here’s an example response for a specific date:
{
"success": true,
"timestamp": 1776708481,
"base": "USD",
"date": "2026-04-20",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for gold and other metals on April 20, 2026.
Time-series Endpoint
The Time-Series Endpoint allows users to obtain exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-04-14",
"end_date": "2026-04-21",
"base": "USD",
"rates": {
"2026-04-14": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-16": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-21": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for gold and other metals over the specified period, allowing for trend analysis.
Convert Endpoint
The Convert Endpoint is useful for converting amounts from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1776794881,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of $1000 to gold, resulting in 0.482 troy ounces.
Fluctuation Endpoint
The Fluctuation Endpoint tracks rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-14",
"end_date": "2026-04-21",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
},
"XAG": {
"start_rate": 0.03825,
"end_rate": 0.03815,
"change": -0.0001,
"change_pct": -0.26
},
"XPT": {
"start_rate": 0.000915,
"end_rate": 0.000912,
"change": -3.0e-6,
"change_pct": -0.33
}
},
"unit": "per troy ounce"
}
This response provides detailed fluctuation data for gold and other metals, including percentage changes over the specified period.
OHLC (Open/High/Low/Close) Endpoint
The OHLC Endpoint provides open, high, low, and close data for a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1776794881,
"base": "USD",
"date": "2026-04-21",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
},
"XAG": {
"open": 0.03825,
"high": 0.0383,
"low": 0.0381,
"close": 0.03815
},
"XPT": {
"open": 0.000915,
"high": 0.000918,
"low": 0.00091,
"close": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a comprehensive view of the price movements for gold and other metals, essential for traders performing technical analysis.
Bid/Ask Endpoint
The Bid/Ask Endpoint allows users to get current bid and ask prices for metals. Here’s an example response:
{
"success": true,
"timestamp": 1776794881,
"base": "USD",
"date": "2026-04-21",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
},
"XPT": {
"bid": 0.000911,
"ask": 0.000913,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
This response provides the current bid and ask prices for gold and other metals, which is crucial for traders looking to execute orders at optimal prices.
Conclusion
Accessing historical prices for SPDR Gold MiniShares (GLDM) has never been easier, thanks to the Metals-API. By utilizing its various endpoints, developers can retrieve real-time and historical data, perform conversions, and analyze market fluctuations. The API's comprehensive features, including the Latest Rates, Historical Rates, and Bid/Ask endpoints, provide a robust framework for building applications that cater to the needs of traders and investors alike.
For further exploration of the API's capabilities, refer to the Metals-API Documentation and the Metals-API Supported Symbols page. By leveraging the power of real-time metals data, developers can create innovative solutions that enhance trading strategies and improve decision-making processes in the precious metals market.