Get GLDM Historical Prices with Metals-API

Get GLDM Historical Prices with Metals-API
In the world of finance and investment, understanding the historical prices of metals like gold is crucial for making informed decisions. One of the most effective ways to access this data is through the Metals-API. This powerful API provides developers with the tools necessary to retrieve real-time and historical prices for various metals, including SPDR Gold Shares (GLD). In this blog post, we will explore the capabilities of Metals-API, focusing on how to obtain historical prices for GLD and other metals, while also discussing the broader implications of technological advancements in the metal markets.
About SPDR Gold Shares (GLD)
SPDR Gold Shares (GLD) is one of the largest and most recognized exchange-traded funds (ETFs) that tracks the price of gold. As investors increasingly turn to gold as a safe-haven asset, understanding its price movements becomes essential. The digital transformation in metal markets has made it easier than ever to access and analyze this data. With the integration of smart technology and data analytics, investors can now leverage real-time information to make strategic decisions.
Technological innovation has revolutionized the way we interact with financial markets. The Metals-API exemplifies this transformation by providing developers with a robust platform to access comprehensive metal price data. By utilizing advanced data analytics, users can gain insights into market trends, price fluctuations, and historical performance, enabling them to make data-driven investment decisions.
Metals-API Information
The Metals-API Documentation provides a detailed overview of the API's capabilities, including its various endpoints and features. This API empowers developers to build next-generation applications that can analyze metal prices in real-time. The transformative potential of real-time metals data cannot be overstated, as it allows for immediate responses to market changes and enhances the overall trading experience.
Key Features and Endpoints
Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- 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. This feature is essential for traders who need the most current pricing information.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. You can query the Metals-API for historical rates by appending a date to the endpoint. This is particularly useful for analyzing trends over time.
- Bid and Ask Endpoint: This powerful feature enables you to retrieve real-time bid and ask prices, allowing traders to make informed decisions based on current market conditions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, which can be used to convert any amount from one currency to another, facilitating transactions across different markets.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice, providing a comprehensive view of price movements over time.
- Fluctuation Endpoint: With this endpoint, you can retrieve information about how currencies fluctuate on a day-to-day basis, which is crucial for understanding market volatility.
- Carat Endpoint: This feature allows you to retrieve information about gold rates by carat, catering to jewelers and consumers interested in specific gold qualities.
- Lowest/Highest Price Endpoint: This endpoint enables you to query the API to get the lowest and highest price for a specified date, which is valuable for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides 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, allowing for a deeper analysis of metal prices.
- API Key: Your API Key is a unique identifier that must be passed into the API base URL's access_key parameter to authenticate your requests.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API comes with numerous endpoints, each providing different functionalities, ensuring comprehensive coverage of metal pricing data.
- Supported Symbols Endpoint: This endpoint returns all available currencies, allowing developers to stay updated on the latest symbols supported by the API.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, catering to a specific market segment.
- News Endpoint: Stay informed with the latest news articles related to various metals, enhancing your market awareness.
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
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1742032932,
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1741946532,
"base": "USD",
"date": "2025-03-14",
"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-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"
}
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": 1742032932,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1742032932,
"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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1742032932,
"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"
}
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers looking to access historical prices and real-time data for metals like gold. By leveraging the various endpoints offered by the API, developers can create applications that provide insights into market trends, price fluctuations, and historical performance. The integration of advanced technology and data analytics in the metal markets has transformed the way investors interact with these assets, enabling them to make informed decisions based on real-time data.
For more information on how to get started with the Metals-API, refer to the Metals-API Documentation. To explore the full range of supported symbols, visit the Metals-API Supported Symbols page. Embrace the future of metal trading with the powerful capabilities of Metals-API.