Obtain Gold Bid (XAU-BID) - Per Ounce Historical Prices from this API

Obtain Gold Bid (XAU-BID) - Per Ounce Historical Prices from this API
In the world of finance and investment, the demand for accurate and timely data is paramount, especially when it comes to precious metals like gold. The Gold Bid (XAU-BID) represents the price at which gold can be sold, and obtaining historical prices is crucial for traders, analysts, and developers alike. With the advent of APIs, accessing this data has become significantly easier. One such powerful tool is the Metals-API, which provides comprehensive access to historical prices and real-time data for various metals, including gold.
Metals-API Information
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 critical role in global finance, serving as a hedge against inflation and currency fluctuations. The digital transformation in the precious metals market has led to the integration of advanced data analytics and technology, enabling traders to make informed decisions based on real-time insights.
With the rise of digital asset solutions, the trading landscape for gold has evolved. The integration of technology in trading platforms allows for innovative price discovery mechanisms, giving traders access to a wealth of market insights. The Metals-API stands at the forefront of this transformation, empowering developers to build next-generation applications that leverage real-time metals data.
API Description
The Metals-API is a robust platform that provides developers with the tools needed to access and utilize metals pricing data effectively. With its innovative capabilities, the API allows users to retrieve real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API is designed to facilitate the development of applications that require accurate and timely metals data, making it an invaluable resource for traders and analysts.
One of the key features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on your subscription plan, the API can return the latest rates updated every 60 minutes, every 10 minutes, or even more frequently. This ensures that users have access to the most current market information, which is essential for making informed trading decisions.
The API also provides historical rates dating back to 2019, allowing users to query for past prices by appending a specific date to the request. This feature is particularly useful for analysts who need to conduct trend analysis or backtesting on historical data.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to provide specific functionalities that cater to different user needs. Here are some of the most notable endpoints:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. Users can retrieve the latest bid and ask prices, ensuring they are always informed of the current market conditions.
- Historical Rates Endpoint: Users can access historical exchange rates for any date since 2019. This endpoint is invaluable for conducting analysis on price movements over time.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts between different metals or to/from USD.
- Time-Series Endpoint: This endpoint allows users to query for daily historical rates between two specified dates, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate between two dates, providing insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve gold rates based on carat measurements, which is essential for jewelers and gold traders.
- Lowest/Highest Price Endpoint: Users can query for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with the open, high, low, and close prices for metals over a specified date range, which is crucial for technical analysis.
- 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 requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold prices specifically for the Indian market.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed of market developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers looking to integrate its capabilities into their applications. Below are examples of various API endpoints along with their expected JSON responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1751331735,
"base": "USD",
"date": "2025-07-01",
"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": 1751245335,
"base": "USD",
"date": "2025-06-30",
"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-06-24",
"end_date": "2025-07-01",
"base": "USD",
"rates": {
"2025-06-24": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-26": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-01": {
"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": 1751331735,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-24",
"end_date": "2025-07-01",
"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": 1751331735,
"base": "USD",
"date": "2025-07-01",
"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": 1751331735,
"base": "USD",
"date": "2025-07-01",
"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 a powerful tool for developers and traders looking to access real-time and historical data for precious metals like gold. With its comprehensive range of endpoints, users can retrieve the latest rates, historical prices, and even track fluctuations over time. The API's capabilities allow for innovative applications in trading, investment analysis, and market research.
By leveraging the Metals-API, developers can create applications that provide valuable insights into the precious metals market, enabling users to make informed decisions based on accurate and timely data. Whether you are a trader looking to optimize your strategies or a developer seeking to integrate metals data into your applications, the Metals-API offers the tools you need to succeed.
For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals. The future of trading and investment in precious metals is here, and with the right tools, you can stay ahead of the curve.