Get SPDR Gold MiniShares (GLDM) Historical Prices with Metals-API

Get SPDR Gold MiniShares (GLDM) Historical Prices with Metals-API
In the world of precious metals trading, having access to accurate and timely historical price data is crucial for making informed investment decisions. The SPDR Gold MiniShares (GLDM) is a popular choice among investors looking to gain exposure to gold without the complexities of physical ownership. To effectively track the performance of GLDM, investors can leverage the capabilities of the Metals-API, a powerful tool that provides real-time and historical data for various metals, including gold (XAU). This blog post will explore how to obtain historical prices for GLDM using Metals-API, along with a detailed overview of its features, capabilities, and practical applications.
Metals-API Information
Metals-API is a robust platform that offers developers access to real-time and historical data for precious metals. With its innovative technology and user-friendly interface, Metals-API empowers developers to create next-generation applications that can analyze market trends, perform data analytics, and integrate seamlessly into trading platforms. The API provides a comprehensive set of endpoints that allow users to retrieve the latest rates, historical prices, and fluctuations of various metals, enabling informed decision-making in the trading landscape.
About Gold (XAU)
Gold 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 revolutionized how investors access and analyze gold prices. The integration of data analytics and market insights has enabled traders to make more informed decisions based on real-time data. The Metals-API plays a pivotal role in this transformation by providing developers with the tools necessary to build applications that can analyze gold price trends, perform historical data comparisons, and offer innovative digital asset solutions.
As the demand for gold continues to rise, the importance of accurate price discovery becomes paramount. The Metals-API facilitates this by offering a range of endpoints that provide detailed insights into gold pricing, including the latest rates, historical data, and fluctuations. By harnessing the power of technology, developers can create applications that not only track gold prices but also analyze market trends and provide actionable insights to investors.
API Description
The Metals-API is designed to be user-friendly while offering powerful capabilities for developers. With a focus on innovation and technological advancement, the API provides real-time metals data that can be integrated into various applications. The API's endpoints allow users to access a wealth of information, including the latest exchange rates, historical prices, and detailed fluctuations of metals like gold (XAU).
Developers can utilize the Metals-API Documentation to explore the various endpoints available, including the Latest Rates Endpoint, Historical Rates Endpoint, and more. Each endpoint is designed to provide specific functionalities that cater to the diverse needs of developers and traders alike.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each serving a unique purpose in the realm of metals data retrieval. Below are some of the key features and their potential applications:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on the user's subscription plan. Depending on the plan, users can receive updates every 60 minutes or every 10 minutes, ensuring they have the most current information at their fingertips.
- 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 for analysis and comparison.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders looking to analyze price movements across different currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates, making it ideal for trend analysis and historical comparisons.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, catering to jewelers and consumers interested in specific gold purity levels.
- Lowest/Highest Price Endpoint: Users can query the API to obtain the lowest and highest prices for a specified date, aiding in market analysis and decision-making.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with open, high, low, and close prices for a specific date, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends over time.
- API Key: Each user is assigned a unique API key, which must be included in API requests to authenticate and authorize access to the data.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format for easy integration.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, catering to regional market needs.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context and insights into market movements.
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 metals into their applications.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1742032869,
"base": "USD",
"date": "2025-03-15",
"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"
}
This response indicates a successful request, providing the latest exchange rates for various metals, including gold (XAU).
Historical Rates Endpoint
{
"success": true,
"timestamp": 1741946469,
"base": "USD",
"date": "2025-03-14",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows a successful response for historical rates, allowing developers to analyze past price movements.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-03-08",
"end_date": "2025-03-15",
"base": "USD",
"rates": {
"2025-03-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-03-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-03-15": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of gold prices, allowing for trend analysis over a specified period.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1742032869,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example illustrates how to convert an amount from USD to gold (XAU), providing the conversion rate and resulting value.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-03-08",
"end_date": "2025-03-15",
"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 insights into how metal prices fluctuate over a specified period, essential for understanding market dynamics.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1742032869,
"base": "USD",
"date": "2025-03-15",
"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 endpoint provides open, high, low, and close prices for a specific date, which is crucial for traders performing technical analysis.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1742032869,
"base": "USD",
"date": "2025-03-15",
"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 current bid and ask prices for metals, offering insights into market liquidity and pricing dynamics.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers and traders looking to access historical prices for SPDR Gold MiniShares (GLDM) and other precious metals. By leveraging the API's robust features, including real-time rates, historical data, and detailed fluctuations, users can gain a comprehensive understanding of the gold market. The ability to integrate this data into applications opens up a world of possibilities for data analytics, market insights, and innovative trading solutions.
For those interested in exploring the full capabilities of the Metals-API, be sure to check out the Metals-API Documentation for detailed information on each endpoint and its functionalities. Additionally, the Metals-API Supported Symbols page provides a complete list of available metals, ensuring you have access to the latest information. Whether you're a seasoned trader or a developer looking to create cutting-edge applications, the Metals-API is your gateway to the world of precious metals data.