Collect SPDR Gold Shares (GLD) price information via this API
Introduction
In the world of finance, the SPDR Gold Shares (GLD) represent a significant investment vehicle for those looking to gain exposure to gold without the complexities of physical ownership. As the demand for real-time data on precious metals continues to rise, developers and traders alike are turning to innovative solutions like the Metals-API. This powerful API provides comprehensive access to gold price information, enabling users to make informed decisions based on accurate and timely data.
Understanding Gold (XAU)
Gold, represented by the symbol XAU, is not just a commodity; it is a digital asset that has transformed the way investors approach wealth preservation and portfolio diversification. The digital transformation in precious metals has opened new avenues for data analytics and market insights, allowing traders to leverage technology for better trading strategies. The integration of advanced technology in trading platforms has revolutionized price discovery, making it easier for investors to track fluctuations and trends in the gold market.
Digital Transformation in Precious Metals
The rise of digital assets has significantly impacted the precious metals market. With the advent of APIs like Metals-API, developers can create applications that provide real-time gold prices, historical data, and analytical tools. This digital transformation allows for seamless integration of data analytics, enabling traders to make data-driven decisions. The ability to access real-time information on gold prices empowers investors to react swiftly to market changes, enhancing their trading strategies.
API Description
The Metals-API is a robust solution for accessing real-time and historical data on various metals, including gold. This API is designed to empower developers to build next-generation applications that require accurate and timely metals data. With its innovative capabilities, the Metals-API allows users to access a wide range of endpoints, each serving a unique purpose in the realm of metals trading.
Key Features of Metals-API
The Metals-API offers a plethora of features that cater to the needs of developers and traders. Here are some of the key functionalities:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This ensures that users have access to the most current gold prices, allowing for timely trading decisions.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date (YYYY-MM-DD) to the endpoint, developers can retrieve past gold prices, which is crucial for trend analysis and market research.
- Bid and Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for gold and other metals. Understanding the bid-ask spread is essential for traders looking to optimize their entry and exit points.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that allows users to convert any amount from one currency to another. This is particularly useful for traders dealing in multiple currencies and needing to assess their positions in gold.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. It is invaluable for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: Users can track how gold prices fluctuate on a day-to-day basis, providing insights into market volatility and helping traders make informed decisions.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and those dealing in high-purity gold.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API for the lowest and highest prices of gold over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access the open, high, low, and close prices for gold, which are critical for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, allowing users to analyze long-term trends in the metals market.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The API offers 14 endpoints, each providing different functionalities tailored to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metals, ensuring users have access to the latest information.
- Intraday Endpoint: This feature allows users to query intraday exchange rate data for a single symbol, providing insights into short-term price 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.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers looking to integrate its capabilities into their applications. Below are examples of various endpoints and their corresponding JSON responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1788221386,
"base": "USD",
"date": "2026-09-01",
"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 that the current price of gold (XAU) is 0.000482 per troy ounce, relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1788134986,
"base": "USD",
"date": "2026-08-31",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical price of gold on August 31, 2026, allowing users to analyze past trends.
Time-Series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-08-25",
"end_date": "2026-09-01",
"base": "USD",
"rates": {
"2026-08-25": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-27": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-09-01": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of gold prices over a specified period, which is essential for trend analysis.
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": 1788221386,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to gold, resulting in 0.482 troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-25",
"end_date": "2026-09-01",
"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 gold prices have fluctuated over a specified period, which is crucial for understanding market dynamics.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1788221386,
"base": "USD",
"date": "2026-09-01",
"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, which are essential for traders conducting technical analysis.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1788221386,
"base": "USD",
"date": "2026-09-01",
"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 the current bid and ask prices for gold, which are critical for traders looking to optimize their trades.
Conclusion
The SPDR Gold Shares (GLD) represent a vital investment option for those looking to gain exposure to gold. With the help of the Metals-API, developers can access a wealth of information regarding gold prices, historical data, and market fluctuations. The API's extensive features, including real-time rates, historical data, and conversion capabilities, empower traders to make informed decisions based on accurate data.
As the financial landscape continues to evolve, the integration of technology in trading and investment strategies will become increasingly important. The Metals-API stands at the forefront of this transformation, providing developers with the tools they need to create innovative applications that enhance trading efficiency and market understanding. For more information on how to leverage the Metals-API, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals.