Query Gold Bid (XAU-BID) - Per Ounce Historical Prices through this API

Query Gold Bid (XAU-BID) - Per Ounce Historical Prices through this API
Metals-API, which provides real-time and historical data for various metals, including gold. This blog post will delve into the capabilities of the Metals-API, focusing on how to retrieve historical prices for gold and the transformative potential of real-time metals data.
About Gold (XAU)
API Description
Metals-API Documentation, which provides detailed guidance on each endpoint and its capabilities.
Key Features and Endpoints
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data for gold and other metals, updated every 60 minutes, 10 minutes, or even more frequently. This feature is essential for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Users can access historical rates for gold dating back to 2019. By appending a specific date to the API request, developers can retrieve historical prices, allowing for in-depth analysis of price movements over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for gold. Understanding the bid-ask spread is crucial for traders, as it directly impacts trading costs and profitability.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts from one metal to another or to/from USD. This feature is particularly useful for traders dealing with multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates. By analyzing time-series data, developers can identify trends and patterns that inform trading strategies.
- Fluctuation Endpoint: Users can track how gold prices fluctuate on a day-to-day basis. This endpoint provides valuable insights into market volatility and helps traders anticipate potential price movements.
- Carat Endpoint: For those interested in gold purity, the carat endpoint provides information about gold rates based on carat weight. This feature is essential for jewelers and consumers alike.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices of gold over a specified period, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can retrieve open, high, low, and close prices for gold over a specific time period. This data is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008. It is particularly useful for traders who focus on industrial metals.
- API Key: Each user receives a unique API key that must be included in the API request to authenticate access. This ensures secure and controlled access to the API's features.
- API Response: The Metals-API delivers exchange rates relative to USD by default. All data is returned in a structured JSON format, making it easy to integrate into applications.
- Available Endpoints: The API provides a constantly updated list of available endpoints, ensuring that developers have access to the latest features and functionalities.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to a specific market segment.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market developments and trends.
List of Symbols
Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1749427780,
"base": "USD",
"date": "2025-06-09",
"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": 1749341380,
"base": "USD",
"date": "2025-06-08",
"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-06-02",
"end_date": "2025-06-09",
"base": "USD",
"rates": {
"2025-06-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-09": {
"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": 1749427780,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-02",
"end_date": "2025-06-09",
"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": 1749427780,
"base": "USD",
"date": "2025-06-09",
"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": 1749427780,
"base": "USD",
"date": "2025-06-09",
"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 offers extensive guidance on how to utilize its features effectively. Additionally, the Metals-API Supported Symbols page provides a complete list of available metal symbols, ensuring that users can access the data they need.