Retrieve Gold Bid (XAU-BID) Historical Prices for multiple dates using this API
Retrieve Gold Bid (XAU-BID) Historical Prices for Multiple Dates Using This API
In the world of finance, particularly in precious metals trading, having access to accurate and timely data is crucial. For developers and traders alike, the ability to retrieve historical prices for Gold (XAU) can significantly enhance decision-making processes. This blog post will explore how to effectively utilize the Metals-API to access historical prices for Gold, focusing on its innovative features and capabilities.
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. As a precious metal, it plays a vital role in various markets, including investment, jewelry, and technology. The digital transformation in the precious metals sector has led to the integration of advanced technologies, enabling traders to make informed decisions based on real-time data analytics and market insights.
With the rise of digital asset solutions, the trading landscape for Gold has evolved. Traders now leverage technology for price discovery, utilizing APIs like Metals-API to access real-time and historical data. This innovation allows for better market analysis, forecasting, and strategic planning, ultimately leading to enhanced trading performance.
Metals-API Information
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical data for various metals, including Gold. This API empowers users to build next-generation applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly.
One of the standout features of the Metals-API is its ability to deliver data in a structured JSON format, making it easy for developers to integrate into their applications. The API supports a variety of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019.
Key Features and Endpoints
The Metals-API offers several endpoints that provide a range of functionalities. Here are some of the key features that developers can leverage:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or 10 minutes. This feature is essential for traders who need the most current market information.
- Historical Rates Endpoint: Users can access historical rates for Gold and other metals by appending a specific date (YYYY-MM-DD) to the API request. This functionality is crucial for analyzing past market trends and making informed decisions.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time Bid and Ask prices for Gold, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, facilitating in-depth market analysis over specific periods.
- Fluctuation Endpoint: Users can track how Gold prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve information about Gold rates by Carat, which is essential for jewelers and traders dealing in different purity levels.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for Gold over a specified period, aiding in price analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with the open, high, low, and close prices for Gold, which are critical for technical analysis.
- Historical LME Endpoint: This endpoint allows users to access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Each user is assigned a unique API Key that must be included in the API requests to authenticate access.
- API Response: The Metals-API delivers exchange rates relative to USD, ensuring consistency in data interpretation.
- Supported Symbols Endpoint: This endpoint returns all available currencies, allowing users to stay updated with the latest symbols.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, here are some example responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1773965994,
"base": "USD",
"date": "2026-03-20",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
This response provides the latest exchange rates for Gold (XAU) and other metals, allowing traders to make quick decisions based on current market conditions.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1773879594,
"base": "USD",
"date": "2026-03-19",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to retrieve historical rates for Gold on a specific date, which is essential for analyzing past performance and trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-03-13",
"end_date": "2026-03-20",
"base": "USD",
"rates": {
"2026-03-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to analyze Gold prices over a specific period, providing insights into price trends and fluctuations.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1773965994,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates how to convert an amount from USD to Gold (XAU), which is particularly useful for traders dealing in multiple currencies.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-13",
"end_date": "2026-03-20",
"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 endpoint provides insights into how Gold prices fluctuate over time, which is essential for understanding market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1773965994,
"base": "USD",
"date": "2026-03-20",
"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"
}
The OHLC endpoint is crucial for traders who rely on technical analysis, providing them with the necessary data to make informed trading decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1773965994,
"base": "USD",
"date": "2026-03-20",
"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 is essential for understanding market liquidity and making trading decisions.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for developers and traders looking to access real-time and historical data for Gold (XAU) and other precious metals. By leveraging the various endpoints available, users can gain valuable insights into market trends, price fluctuations, and trading opportunities.
Whether you are a developer building applications that require precise metal pricing data or a trader seeking to enhance your market analysis capabilities, the Metals-API provides the necessary resources to succeed. For more information, explore the Metals-API Documentation and discover 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 real-time metals data to drive your trading strategies forward.