Access Gold (XAU) Historical Prices with this API

Access Gold (XAU) Historical Prices with this API
In today's rapidly evolving financial landscape, the demand for precise and timely data has never been higher. For developers and traders alike, having access to historical prices of precious metals like Gold (XAU) is essential for making informed decisions. The Metals-API provides a robust solution for accessing historical prices and real-time data, enabling users to harness the power of data analytics and market insights.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth preservation and investment. As a digital transformation sweeps through the financial sector, the integration of technology in trading precious metals is becoming increasingly prevalent. The Metals-API stands at the forefront of this transformation, offering developers the tools they need to innovate in price discovery and market analysis.
With the rise of data analytics, traders can now leverage historical data to identify trends, forecast future movements, and make strategic decisions. The Metals-API not only provides access to real-time data but also empowers users to analyze historical prices dating back to 2019, making it an invaluable resource for anyone involved in the precious metals market.
API Description
The Metals-API is designed to provide developers with a comprehensive suite of tools for accessing and utilizing precious metals data. With a focus on innovation and technological advancement, this API allows users to build next-generation applications that can transform how precious metals are traded and analyzed.
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 provide updates every 60 minutes, every 10 minutes, or even more frequently. This level of granularity ensures that traders have the most accurate and up-to-date information at their fingertips.
Moreover, the API's historical rates endpoint allows users to query historical prices for Gold and other metals by appending a specific date to the request. This feature is particularly useful for developers looking to analyze price trends over time and integrate this data into their applications.
For those interested in real-time trading, the Bid and Ask endpoint provides crucial information about current bid and ask prices, allowing traders to make informed decisions based on market conditions. Additionally, the Convert endpoint enables users to convert amounts from one metal to another or to/from USD, making it easier to manage diverse portfolios.
The Metals-API also offers a Time-Series endpoint, which allows users to query daily historical rates between two dates of their choice. This feature is particularly beneficial for conducting in-depth analyses and understanding market fluctuations over time.
Another innovative feature is the Fluctuation endpoint, which provides insights into how prices fluctuate on a day-to-day basis. This data can be invaluable for traders looking to capitalize on short-term market movements.
For those interested in the specifics of Gold pricing, the Carat endpoint allows users to retrieve information about Gold rates by carat, catering to the jewelry and luxury goods market. Furthermore, the Lowest/Highest Price endpoint enables users to query the API for the lowest and highest prices within a specified timeframe, providing a comprehensive view of market dynamics.
The Open/High/Low/Close (OHLC) Price endpoint is another essential tool for traders, allowing them to access detailed price data for specific time periods. This information is crucial for technical analysis and understanding market trends.
For users interested in the London Metal Exchange (LME), the Historical LME endpoint provides access to historical rates dating back to 2008, offering a wealth of data for analysis and decision-making.
To get started with the Metals-API, developers need an API key, which is passed into the API base URL's access_key parameter. This key is essential for authentication and ensures secure access to the API's features.
The API response delivers exchange rates relative to USD by default, and all data is returned in a structured JSON format, making it easy for developers to integrate into their applications. For a complete list of available symbols, users can refer to the Metals-API Supported Symbols page.
Key Features and Endpoints
The Metals-API offers a wide range of endpoints, each designed to provide specific functionalities that cater to various trading and analytical needs. Hereβs a closer look at some of the most significant features:
Latest Rates Endpoint
The Latest Rates endpoint provides real-time exchange rates for all available metals. Depending on your subscription plan, you can receive updates every 60 minutes, every 10 minutes, or even more frequently. This feature is crucial for traders who need to make quick decisions based on the latest market data.
{
"success": true,
"timestamp": 1759550483,
"base": "USD",
"date": "2025-10-04",
"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
This endpoint allows users to access historical exchange rates for any date since 1999. By appending a specific date to the request, developers can retrieve valuable historical data for analysis.
{
"success": true,
"timestamp": 1759464083,
"base": "USD",
"date": "2025-10-03",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-Series Endpoint
The Time-Series endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is particularly useful for conducting trend analyses and understanding price movements over time.
{
"success": true,
"timeseries": true,
"start_date": "2025-09-27",
"end_date": "2025-10-04",
"base": "USD",
"rates": {
"2025-09-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-09-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for managing diverse portfolios and making quick calculations.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1759550483,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
The Fluctuation endpoint provides insights into how prices fluctuate on a day-to-day basis. This data can be invaluable for traders looking to capitalize on short-term market movements.
{
"success": true,
"fluctuation": true,
"start_date": "2025-09-27",
"end_date": "2025-10-04",
"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"
}
Open/High/Low/Close (OHLC) Price Endpoint
This endpoint allows users to access detailed price data for specific time periods, including the open, high, low, and close prices. This information is crucial for technical analysis and understanding market trends.
{
"success": true,
"timestamp": 1759550483,
"base": "USD",
"date": "2025-10-04",
"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
The Bid and Ask endpoint provides current bid and ask prices for metals, allowing traders to make informed decisions based on market conditions.
{
"success": true,
"timestamp": 1759550483,
"base": "USD",
"date": "2025-10-04",
"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
The Metals-API offers a comprehensive suite of tools for accessing and analyzing historical prices of Gold (XAU) and other precious metals. With features like real-time data, historical rates, and advanced endpoints for conversion and fluctuation tracking, developers can build powerful applications that leverage the wealth of information available.
By integrating the Metals-API into your trading strategies, you can gain a competitive edge in the market, utilizing data analytics and technology to make informed decisions. Whether you're a seasoned trader or a developer looking to create innovative solutions, the Metals-API provides the resources you need to succeed.
For more information on how to get started, refer to the Metals-API Documentation, and explore the full range of supported symbols on the Metals-API Supported Symbols page. Embrace the future of trading with the Metals-API and unlock the potential of precious metals data.