Get SPDR Gold MiniShares (GLDM) Historical Prices in JSON format using this API
Get SPDR Gold MiniShares (GLDM) Historical Prices in JSON Format Using This API
In the ever-evolving landscape of financial technology, the demand for real-time data and historical insights has never been greater. For investors and developers interested in precious metals, particularly gold, the SPDR Gold MiniShares (GLDM) represents a significant opportunity. This blog post will delve into how to retrieve historical prices for GLDM using the Metals-API, a powerful tool that provides comprehensive data on various metals, including gold.
Metals-API Information
The Metals-API is designed to offer developers and financial analysts access to real-time and historical data for precious metals. With its robust features, the API empowers users to build applications that can analyze market trends, track price fluctuations, and make informed investment decisions. The API supports a variety of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been regarded as a safe-haven asset and a hedge against inflation. In recent years, the digital transformation in precious metals trading has accelerated, driven by advancements in technology and data analytics. The integration of real-time data into trading platforms has revolutionized how investors approach the gold market.
Data analytics plays a crucial role in providing market insights, allowing traders to make data-driven decisions. By leveraging the capabilities of the Metals-API, developers can create applications that analyze historical price data, identify trends, and forecast future movements in the gold market. This innovation in price discovery is essential for traders looking to capitalize on market fluctuations.
Moreover, the rise of digital asset solutions has further enhanced the accessibility of gold investments. With the Metals-API, developers can seamlessly integrate gold price data into their applications, providing users with real-time insights and facilitating informed trading decisions.
API Description
The Metals-API is a JSON-based API that provides a wide range of functionalities for accessing metals prices and currency conversions. Its innovative approach to delivering real-time data empowers developers to build next-generation applications that can analyze and visualize precious metals data effectively.
One of the key features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on your subscription plan, the API can return updates every 60 minutes, every 10 minutes, or even more frequently. This ensures that users have access to the most current market information, which is vital for making timely investment decisions.
Additionally, the API offers a Historical Rates Endpoint, allowing users to access historical prices for most currencies dating back to 2019. This feature is particularly useful for those looking to analyze trends over time or backtest trading strategies. By appending a specific date to the API request, users can retrieve historical rates for gold and other metals.
Another powerful feature is the Bid and Ask Endpoint, which provides real-time bid and ask prices for various metals. This information is crucial for traders who need to understand the current market spread and make informed decisions about their trades.
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for investors who want to understand the value of their holdings in different currencies or metals.
Furthermore, the Time-Series Endpoint enables users to query the API for daily historical rates between two dates of their choice. This functionality is essential for conducting thorough market analysis and understanding price movements over specific periods.
For those interested in tracking fluctuations, the Fluctuation Endpoint provides information about how currencies fluctuate on a day-to-day basis. This feature is invaluable for traders looking to identify patterns and make predictions based on historical data.
The Metals-API also includes a Carat Endpoint, which allows users to retrieve information about gold rates by carat. This feature is particularly relevant for jewelers and consumers interested in the value of gold jewelry.
Additionally, the Lowest/Highest Price Endpoint enables users to query the API to get the lowest and highest prices for a given date, while the Open/High/Low/Close (OHLC) Price Endpoint provides detailed price information for a specific time period. These endpoints are essential for traders who want to analyze price movements and make informed decisions based on historical data.
For more information on the available endpoints and their functionalities, you can refer to the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a comprehensive suite of features that cater to the diverse needs of developers and traders. Below are some of the key endpoints and their potential applications:
- Latest Rates Endpoint: Retrieve real-time exchange rates for all available metals. This endpoint is crucial for traders who need up-to-date information to make quick decisions.
- Historical Rates Endpoint: Access historical exchange rates for any date since 1999. This feature is essential for backtesting trading strategies and analyzing market trends.
- Bid And Ask Endpoint: Get current bid and ask prices for metals, allowing traders to understand the market spread and make informed trading decisions.
- Convert Endpoint: Convert any amount from one metal to another or to/from USD, providing flexibility for investors dealing with multiple currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates, enabling thorough market analysis.
- Fluctuation Endpoint: Track rate fluctuations between two dates, helping traders identify patterns and make predictions.
- Carat Endpoint: Retrieve information about gold rates by carat, relevant for jewelers and consumers.
- Lowest/Highest Price Endpoint: Get the lowest and highest price for a given date, essential for traders analyzing price movements.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed price information for a specific time period, aiding in price analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, useful for traders dealing with industrial metals.
- API Key: Your unique key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates are delivered relative to USD by default, providing a consistent basis for analysis.
- Available Endpoints: The API comes with 14 endpoints, each offering different functionalities to meet user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users informed about market developments.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, here are some example responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1770250586,
"base": "USD",
"date": "2026-02-05",
"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
{
"success": true,
"timestamp": 1770164186,
"base": "USD",
"date": "2026-02-04",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-29",
"end_date": "2026-02-05",
"base": "USD",
"rates": {
"2026-01-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-31": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-05": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1770250586,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-29",
"end_date": "2026-02-05",
"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
{
"success": true,
"timestamp": 1770250586,
"base": "USD",
"date": "2026-02-05",
"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
{
"success": true,
"timestamp": 1770250586,
"base": "USD",
"date": "2026-02-05",
"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 offers a comprehensive and innovative solution for accessing real-time and historical data on precious metals, particularly gold. By utilizing the various endpoints available, developers can create powerful applications that provide valuable insights into the gold market. The ability to retrieve historical prices for SPDR Gold MiniShares (GLDM) in JSON format opens up numerous possibilities for analysis and investment strategies.
As the digital transformation in precious metals continues, leveraging APIs like Metals-API will be essential for staying ahead in the market. Whether you are a developer looking to build a new application or an investor seeking to analyze historical trends, the Metals-API provides the tools necessary to succeed.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Metals-API Supported Symbols page for a complete list of available metals. With the right tools and insights, you can navigate the complexities of the gold market with confidence.