Get Gold (XAU) prices using this API for historical data retrieval

Get Gold (XAU) Prices Using This API for Historical Data Retrieval
Metals-API provides a robust solution for retrieving historical and current price data. This blog post delves into the features of the Metals-API, exploring how it empowers developers to integrate gold pricing data into their applications, and the transformative potential of real-time metals data.
Metals-API Information
About Gold (XAU)
API Description
Metals-API is designed to provide developers with comprehensive access to metals pricing data. Its capabilities extend beyond mere retrieval of current prices; it offers a suite of endpoints that cater to various needs, from historical data analysis to real-time trading insights. This API empowers developers to build next-generation applications that leverage the latest in technology and data analytics.
Key Features and Endpoints
Latest Rates Endpoint
{
"success": true,
"timestamp": 1755313226,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
{
"success": true,
"timestamp": 1755226826,
"base": "USD",
"date": "2025-08-15",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
{
"success": true,
"timestamp": 1755313226,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1755313226,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-08-09",
"end_date": "2025-08-16",
"base": "USD",
"rates": {
"2025-08-09": {
"XAU": 0.000485
},
"2025-08-11": {
"XAU": 0.000483
},
"2025-08-16": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-08-09",
"end_date": "2025-08-16",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
{
"success": true,
"timestamp": 1755313226,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Lowest/Highest Price Endpoint
{
"success": true,
"timestamp": 1755313226,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
API Key and Response
Supported Symbols Endpoint
Metals-API Supported Symbols page.
Gold Price India Endpoint
News Endpoint
Conclusion
Metals-API Documentation and explore the various endpoints available. Whether you are a seasoned trader or a developer looking to build the next big financial application, the Metals-API provides the tools you need to succeed in the dynamic world of precious metals trading.