Retrieve SPDR Gold MiniShares (GLDM) Historical Prices from a Reliable API
Retrieve SPDR Gold MiniShares (GLDM) Historical Prices from a Reliable API
In the world of precious metals trading, having access to accurate and timely historical price data is crucial for making informed investment decisions. One of the most reliable sources for such data is the Metals-API. This powerful API provides developers with the tools necessary to retrieve historical prices for various metals, including SPDR Gold MiniShares (GLDM). In this blog post, we will explore the capabilities of Metals-API, focusing on how to efficiently retrieve historical prices for gold and other precious metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been regarded as a safe-haven asset and a hedge against inflation. Its value is influenced by various factors, including market demand, geopolitical stability, and currency fluctuations. In recent years, the digital transformation in precious metals trading has revolutionized how investors access and analyze gold prices. With advancements in data analytics and technology integration, traders can now leverage real-time data to gain market insights and make informed decisions.
The integration of technology in trading has led to innovative solutions for price discovery. Digital asset solutions enable investors to track gold prices in real-time, allowing for more strategic trading. The Metals-API stands at the forefront of this transformation, providing developers with the ability to build next-generation applications that utilize real-time metals data.
Metals-API Information
The Metals-API Documentation outlines the various features and endpoints available to users. This API is designed to empower developers to create applications that can access a wealth of information about precious metals. With a focus on innovation and technological advancement, Metals-API offers a range of endpoints that cater to different needs.
Key Features and Endpoints
Metals-API provides several key features that enhance the user experience and enable developers to retrieve valuable data efficiently. Below are some of the most significant endpoints and their applications:
- Latest Rates Endpoint: This endpoint allows users to retrieve real-time exchange rate data for metals. Depending on the subscription plan, the API can return updates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to stay updated on the latest market conditions.
- Historical Rates Endpoint: Users can access historical rates for most metals dating back to 2019. By appending a specific date to the API request, developers can retrieve historical price data, which is invaluable for trend analysis and backtesting trading strategies.
- Bid and Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for metals. Understanding the bid-ask spread is crucial for traders looking to execute trades at optimal prices.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for investors dealing with multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. This functionality is essential for analyzing price movements over specific periods.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis using this endpoint. It provides insights into market volatility, helping traders make informed decisions.
- Carat Endpoint: This endpoint provides information about gold rates by carat, which is useful for jewelers and investors interested in specific gold purity levels.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices of metals within a specified date range, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can retrieve open, high, low, and close prices for a specific time period, which is essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing users to analyze long-term trends.
- API Key: Users must pass their unique API key into the API base URL's access_key parameter to authenticate requests. This ensures secure access to the API's features.
- API Response: The Metals-API delivers exchange rates relative to USD by default. All data is returned in a structured JSON format, making it easy for developers to parse and utilize.
- Available Endpoints: The API comes with 14 endpoints, each providing different functionalities. Developers can choose the endpoints that best suit their needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available metal symbols, ensuring users have access to the latest information.
- 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. This resource is invaluable for developers looking to integrate specific metal data into their applications.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints, including their expected JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1764820859,
"base": "USD",
"date": "2025-12-04",
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1764734459,
"base": "USD",
"date": "2025-12-03",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2025-11-27",
"end_date": "2025-12-04",
"base": "USD",
"rates": {
"2025-11-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-12-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1764820859,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-27",
"end_date": "2025-12-04",
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1764820859,
"base": "USD",
"date": "2025-12-04",
"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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1764820859,
"base": "USD",
"date": "2025-12-04",
"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"
}
Conclusion
In conclusion, the Metals-API provides a comprehensive and reliable solution for retrieving historical prices of SPDR Gold MiniShares (GLDM) and other precious metals. With its extensive range of endpoints, developers can access real-time data, historical rates, and valuable market insights. The integration of technology in precious metals trading has transformed how investors interact with the market, and the Metals-API stands as a testament to this evolution.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that empower traders to make informed decisions based on accurate and timely data. Whether you are looking to analyze historical trends, track fluctuations, or convert between different metals, the Metals-API offers the tools necessary to succeed in the dynamic world of precious metals trading.
For more information, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on how to implement these features in your applications.