Access Gold Bid (XAU-BID) - Per Ounce Historical Prices with this API

Access Gold Bid (XAU-BID) - Per Ounce Historical Prices with this API
In the ever-evolving landscape of financial technology, the demand for precise and real-time data has never been more critical, especially in the realm of precious metals trading. One of the most sought-after assets is gold, represented by the symbol XAU. Accessing historical prices for gold is essential for traders, analysts, and developers looking to build applications that require accurate market insights. The Metals-API provides a robust solution for obtaining historical prices and real-time data for gold and other metals, empowering developers to create innovative applications that leverage this data.
About Gold (XAU)
Gold has long been considered a safe haven asset, a hedge against inflation, and a store of value. In recent years, the digital transformation in precious metals has opened new avenues for trading and investment. With the integration of technology in trading platforms, data analytics has become a cornerstone for market insights. Developers can harness the power of the Metals-API to access real-time and historical data, enabling them to build applications that can analyze trends, forecast prices, and provide users with actionable insights.
As the market for digital assets continues to grow, the need for innovative price discovery mechanisms becomes paramount. The Metals-API not only provides historical prices but also integrates advanced features that allow developers to create digital asset solutions tailored to their specific needs. By utilizing data analytics, developers can gain deeper insights into market behavior, enhancing their trading strategies and decision-making processes.
API Description
The Metals-API is a powerful tool designed for developers who require access to real-time and historical metals data. This API offers a wide range of functionalities that enable developers to build next-generation applications. With its user-friendly interface and comprehensive documentation, the Metals-API simplifies the process of integrating metals data into applications.
For more information, you can visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers several key features that cater to various needs in the precious metals market. Here are some of the most notable 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, every 10 minutes, or even more frequently. This feature is crucial for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Historical rates for gold (XAU) and other metals are available dating back to 2019. Developers can query the Metals-API by appending a specific date to retrieve historical prices, allowing for in-depth analysis of market trends over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve 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 in the market.
- 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. It is invaluable for conducting trend analysis and understanding price movements over time.
- Fluctuation Endpoint: Users can track how gold and other metals fluctuate on a day-to-day basis using this endpoint. It provides insights into market volatility and helps traders make informed decisions.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and those involved in the jewelry market.
- Lowest/Highest Price Endpoint: This endpoint enables 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 access the open, high, low, and close prices for gold, which are critical for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive analysis of market trends.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate and authorize access to the data.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency and ease of use for developers.
- Available Endpoints: The API provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest data.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold prices specifically for the Indian market, catering to local traders and investors.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market developments and trends.
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.
API Endpoint Examples and Responses
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1747375283,
"base": "USD",
"date": "2025-05-16",
"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": 1747288883,
"base": "USD",
"date": "2025-05-15",
"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-05-09",
"end_date": "2025-05-16",
"base": "USD",
"rates": {
"2025-05-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-16": {
"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": 1747375283,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-09",
"end_date": "2025-05-16",
"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": 1747375283,
"base": "USD",
"date": "2025-05-16",
"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": 1747375283,
"base": "USD",
"date": "2025-05-16",
"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 offers a comprehensive solution for accessing historical prices and real-time data for gold (XAU) and other precious metals. With its extensive range of features, developers can create innovative applications that leverage this data for trading, analysis, and market insights. The API's capabilities, including the latest rates, historical rates, bid and ask prices, and various conversion options, empower developers to build robust applications that meet the demands of the modern financial landscape.
By utilizing the Metals-API, developers can enhance their trading strategies, optimize their applications, and provide users with valuable insights into the precious metals market. For more information on how to get started, visit the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals.