Get Accurate Gold Bid (XAU-BID) Prices in Multiple Currencies for Trading Strategies with this API
Get Accurate Gold Bid (XAU-BID) Prices in Multiple Currencies for Trading Strategies with this API
In the fast-paced world of trading, having access to accurate and real-time data is crucial for making informed decisions. The Metals-API provides a powerful solution for developers looking to integrate precise Gold (XAU) prices in various currencies into their trading strategies. This API not only offers real-time bid and ask prices but also historical data, fluctuations, and conversion capabilities, making it an essential tool for anyone involved in precious metals trading.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset and a hedge against inflation. In recent years, the digital transformation in precious metals trading has led to the integration of advanced data analytics and market insights. The Metals-API plays a pivotal role in this transformation by providing developers with the tools necessary to harness technology for innovative price discovery and trading strategies.
With the rise of digital asset solutions, traders can now access real-time data that empowers them to make swift decisions based on market movements. The Metals-API stands out by offering comprehensive data analytics that can be leveraged to gain insights into market trends, enabling traders to optimize their strategies effectively.
API Description
The Metals-API is designed to deliver real-time metals data, enabling developers to build next-generation applications that require accurate pricing information. With its robust architecture, the API supports a variety of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data and fluctuations.
For more detailed information on how to utilize the API, refer to the Metals-API Documentation. This resource provides comprehensive guidance on how to implement the API effectively, ensuring that developers can maximize its potential.
Key Features and Endpoints
The Metals-API offers a wide range of features that cater to various trading needs. Here are some of the key endpoints and their functionalities:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or every 10 minutes, ensuring that traders have the most current information at their fingertips.
- Historical Rates Endpoint: Access historical rates dating back to 2019 for most currencies. By appending a specific date in the format YYYY-MM-DD, users can query the Metals-API for past rates, which is invaluable for trend analysis and backtesting trading strategies.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for various metals. Understanding the spread between these prices is crucial for traders looking to optimize their entry and exit points.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one currency to another seamlessly. This is particularly useful for traders operating in multiple currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two specified dates. This functionality is essential for analyzing price movements over time.
- Fluctuation Endpoint: This endpoint provides insights into how metal prices fluctuate on a day-to-day basis, allowing traders to assess volatility and make informed decisions.
- Carat Endpoint: Retrieve information about Gold rates by carat, which is essential for jewelers and traders dealing in fine jewelry.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can obtain OHLC data for a specific time period, which is vital for technical analysis and charting.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term 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 by default, ensuring consistency in data presentation.
- Available Endpoints: The API comprises 14 endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest symbols.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping traders informed about market developments.
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": 1778890966,
"base": "USD",
"date": "2026-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": 1778804566,
"base": "USD",
"date": "2026-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": "2026-05-09",
"end_date": "2026-05-16",
"base": "USD",
"rates": {
"2026-05-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-05-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-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": 1778890966,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-09",
"end_date": "2026-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": 1778890966,
"base": "USD",
"date": "2026-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": 1778890966,
"base": "USD",
"date": "2026-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 is an invaluable resource for developers looking to integrate accurate Gold (XAU) prices into their trading strategies. With its extensive range of endpoints, including real-time rates, historical data, and conversion capabilities, the API empowers users to make informed decisions based on reliable data. By leveraging the capabilities of the Metals-API, traders can enhance their strategies, optimize their trading performance, and stay ahead in the competitive world of precious metals trading.
For further exploration of the API's capabilities, visit the Metals-API Website and dive into the Metals-API Documentation for detailed implementation guidance. Don't forget to check the Metals-API Supported Symbols page for a comprehensive list of available currencies and metals.