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

Access Gold Bid (XAU-BID) Historical Prices through this API
In today's fast-paced financial landscape, the ability to access and analyze historical prices for precious metals like gold (XAU) is crucial for traders, investors, and developers alike. The 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)
Gold has long been regarded as a safe haven asset, a hedge against inflation, and a store of value. In recent years, the digital transformation in the precious metals market has revolutionized how investors and traders interact with gold. The integration of data analytics and market insights has empowered stakeholders to make data-driven decisions, enhancing their trading strategies.
With the rise of technology in trading, the demand for real-time data has surged. The Metals-API stands at the forefront of this transformation, providing developers with the tools to build next-generation applications that leverage real-time metals data. The API facilitates innovation in price discovery, allowing users to access up-to-date information on gold prices and other precious metals.
API Description
The Metals-API is a powerful tool designed to provide users with real-time and historical data on precious metals. It empowers developers to create applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. The API's capabilities extend beyond mere data retrieval; it offers a transformative potential for users looking to integrate metals data into their platforms.
For detailed information on how to use the API, refer to the Metals-API Documentation. This resource provides comprehensive guidance on the various endpoints available, including how to authenticate and make requests.
Key Features and Endpoints
The Metals-API boasts several key features that enhance its usability and functionality. Below are some of the most notable endpoints and their applications:
- 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
The Metals-API provides access to a comprehensive range of metal symbols. For a complete list of all supported symbols and their specifications, refer to the 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
Understanding the API's response structure is crucial for effective integration. Below are examples of various API endpoints along with their JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"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
Access historical exchange rates for any date since 1999.
{
"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
Get exchange rates for a specific time period.
{
"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
Convert any amount from one metal to another or to/from USD.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1746590471,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"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
Get OHLC data for a specific time period.
{
"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
Get current bid and ask prices for metals.
{
"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
The Metals-API is an invaluable resource for developers and traders looking to access historical prices for gold (XAU) and other precious metals. Its comprehensive features, including real-time data, historical rates, and various endpoints, empower users to make informed decisions based on accurate market insights. By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance trading strategies and improve market analysis.
For more information on how to implement these features and access the full potential of the Metals-API, visit the 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.