Access Gold Bid (XAU-BID) Historical Prices through this API

Access Gold Bid (XAU-BID) Historical Prices through this API
Metals-API offers a robust solution for retrieving historical prices, enabling users to make informed decisions based on accurate and timely data. This blog post delves into the capabilities of the Metals-API, focusing on how to access historical prices for gold and the innovative features that set this API apart.
About Gold (XAU)
API Description
Metals-API Documentation. This resource provides comprehensive guidance on the various endpoints available, including how to authenticate and make requests.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for precious metals, updated based on your subscription plan. Users can access the latest rates for gold (XAU) and other metals, allowing for timely trading decisions.
- Historical Rates Endpoint: Users can retrieve historical rates for gold dating back to 2019. By appending a specific date to the API request, developers can access past price data, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to obtain 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, enabling users to convert amounts between different metals or to/from USD. This is particularly useful for traders operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates. It is ideal for analyzing price movements over time and identifying patterns.
- Fluctuation Endpoint: Users can track how gold prices fluctuate on a day-to-day basis. This endpoint provides insights into market volatility, helping traders make informed decisions.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, which is essential for jewelers and those involved in the jewelry market.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for gold over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for gold, which are critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Each user is assigned a unique API key, which must be included in requests to authenticate access to the API.
- API Response: The API returns exchange rates relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a variety of endpoints, each designed to serve specific functionalities.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available metal symbols, 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 to market movements.
List of Symbols
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
{
"success": true,
"timestamp": 1746590471,
"base": "USD",
"date": "2025-05-07",
"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
{
"success": true,
"timestamp": 1746504071,
"base": "USD",
"date": "2025-05-06",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-04-30",
"end_date": "2025-05-07",
"base": "USD",
"rates": {
"2025-04-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1746590471,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-30",
"end_date": "2025-05-07",
"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
{
"success": true,
"timestamp": 1746590471,
"base": "USD",
"date": "2025-05-07",
"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
{
"success": true,
"timestamp": 1746590471,
"base": "USD",
"date": "2025-05-07",
"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
Metals-API Documentation. Whether you are looking to track gold prices, analyze market trends, or integrate metals data into your applications, the Metals-API provides the tools you need to succeed in the dynamic world of precious metals trading.