Obtain SPDR Gold MiniShares (GLDM) Historical Prices through Metals-API

Obtain SPDR Gold MiniShares (GLDM) Historical Prices through Metals-API
In the world of precious metals trading, obtaining accurate and timely historical prices is crucial for making informed investment decisions. One of the most sought-after assets in this domain is gold, represented by the symbol XAU. For developers and traders looking to access historical prices of SPDR Gold MiniShares (GLDM), the Metals-API provides a robust solution. This blog post will explore how to leverage the Metals-API to obtain historical prices, delve into the intricacies of gold trading, and discuss the technological advancements that make this possible.
Metals-API Information
The Metals-API is a powerful tool designed for developers and traders who require real-time and historical data on various metals, including gold, silver, platinum, and palladium. With its comprehensive set of features, the API enables users to integrate metals data into their applications seamlessly. The API supports a wide range of functionalities, including retrieving the latest rates, historical prices, and even fluctuations over time.
About Gold (XAU)
Gold has long been considered a safe haven asset, especially during times of economic uncertainty. Its value is influenced by various factors, including market demand, geopolitical events, and currency fluctuations. In recent years, the digital transformation in precious metals trading has revolutionized how investors access and analyze gold prices. The integration of data analytics and market insights has empowered traders to make data-driven decisions.
Moreover, technology integration in trading platforms has enabled real-time access to gold prices, allowing for innovation in price discovery. The advent of digital asset solutions has further enhanced the trading experience, making it easier for investors to track their investments and respond to market changes promptly.
API Description
The Metals-API offers a suite of features that empower developers to build next-generation applications. With real-time metals data at their fingertips, users can create sophisticated trading platforms, analytical tools, and investment dashboards. The API's capabilities include:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. Users can query the API for historical rates by appending a date to the endpoint.
- Bid And Ask Endpoint: Retrieve real-time Bid and Ask prices, a powerful feature for traders looking to make informed decisions based on current market conditions.
- Convert Endpoint: This endpoint allows users to convert any amount from one currency to another, facilitating seamless transactions across different metals.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling users to analyze trends over time.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Access information about gold rates by carat, which is essential for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Obtain OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The API comes with multiple endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: A constantly updated endpoint returning all available currencies, allowing users to stay informed about the latest offerings.
- Gold Price India Endpoint: Retrieve the latest gold price in India using the dedicated endpoint, catering to regional market needs.
- News Endpoint: Access the latest news articles related to various metals, keeping users informed about market developments.
Key Features and Endpoints
To effectively utilize the Metals-API for obtaining historical prices of SPDR Gold MiniShares (GLDM), it is essential to understand the key features and endpoints available. Below, we will explore some of the most important endpoints in detail, providing examples and explanations of their functionality.
Latest Rates Endpoint
The Latest Rates Endpoint is designed to provide real-time exchange rates for all available metals. Depending on your subscription plan, the API can return data updated every 60 minutes, every 10 minutes, or even more frequently. This endpoint is crucial for traders who need to make quick decisions based on the latest market conditions.
{
"success": true,
"timestamp": 1745215215,
"base": "USD",
"date": "2025-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 example response, the API returns the latest rates for various metals, including gold (XAU), silver (XAG), and platinum (XPT). The rates are provided in terms of troy ounces, which is the standard measurement for precious metals.
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for any date since 1999. This is particularly useful for traders looking to analyze past performance and trends in gold prices.
{
"success": true,
"timestamp": 1745128815,
"base": "USD",
"date": "2025-04-20",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
In this response, the API provides historical rates for gold and other metals for a specific date. Traders can use this data to conduct technical analysis and identify patterns in price movements.
Time-Series Endpoint
The Time-Series Endpoint enables users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for those looking to analyze trends over specific periods.
{
"success": true,
"timeseries": true,
"start_date": "2025-04-14",
"end_date": "2025-04-21",
"base": "USD",
"rates": {
"2025-04-14": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-16": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-21": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This example illustrates how the Time-Series Endpoint provides daily rates for gold over a specified period, allowing traders to visualize price movements and make informed decisions.
Convert Endpoint
The Convert Endpoint is a valuable feature that allows users to convert any amount from one metal to another or to/from USD. This is particularly useful for traders who need to calculate the equivalent value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1745215215,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
In this response, the API shows the conversion of 1000 USD to gold (XAU), resulting in approximately 0.482 troy ounces. This feature simplifies the process of managing investments across different metals.
Fluctuation Endpoint
The Fluctuation Endpoint provides insights into how currencies fluctuate on a day-to-day basis. This is essential for traders who want to understand market volatility and make strategic decisions based on price changes.
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-14",
"end_date": "2025-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 example highlights the fluctuations in gold and silver prices over a specified period, providing traders with valuable insights into market trends.
Open/High/Low/Close (OHLC) Price Endpoint
The Open/High/Low/Close (OHLC) Price Endpoint allows users to obtain OHLC data for a specific time period. This data is crucial for technical analysis, enabling traders to identify trends and make predictions based on historical performance.
{
"success": true,
"timestamp": 1745215215,
"base": "USD",
"date": "2025-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 the open, high, low, and close prices for gold and other metals, allowing traders to analyze price movements and make informed trading decisions.
Bid/Ask Endpoint
The Bid/Ask Endpoint provides current bid and ask prices for metals, which is essential for traders looking to execute trades at the best possible prices.
{
"success": true,
"timestamp": 1745215215,
"base": "USD",
"date": "2025-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 example illustrates the current bid and ask prices for gold, silver, and platinum, providing traders with the necessary information to make timely trading decisions.
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 and traders who need to stay informed about the latest offerings and changes in the market.
Conclusion
In conclusion, obtaining historical prices for SPDR Gold MiniShares (GLDM) through the Metals-API is a straightforward process that can significantly enhance trading strategies. By leveraging the various endpoints offered by the API, developers can create sophisticated applications that provide real-time and historical data on gold and other precious metals.
The integration of technology in precious metals trading has transformed the landscape, allowing for greater accessibility and analysis of market data. As traders continue to seek innovative solutions for managing their investments, the Metals-API stands out as a powerful tool for accessing critical information.
For more detailed information on how to implement these features, refer to the Metals-API Documentation. This resource provides comprehensive guidance on using the API effectively, ensuring that developers can maximize its potential for their trading applications.
As the market continues to evolve, staying informed about the latest trends and data is essential for success in precious metals trading. The Metals-API not only provides access to historical prices but also empowers users with the tools needed to analyze and respond to market changes effectively.