Access Gold Bid (XAU-BID) Exchange Rates via Public API in JSON Format
Access Gold Bid (XAU-BID) Exchange Rates via Public API in JSON Format
In today's rapidly evolving financial landscape, the ability to access real-time exchange rates for precious metals like Gold (XAU) is crucial for developers and traders alike. The Metals-API provides a robust solution for retrieving exchange rates in JSON format, enabling seamless integration into applications. This blog post will explore how to effectively utilize the Metals-API to access Gold exchange rates, including sample API responses and integration tips.
About Gold (XAU)
Gold has long been considered a safe haven asset, especially during times of economic uncertainty. As digital transformation continues to reshape the financial sector, the integration of data analytics and technology in trading has become paramount. The Metals-API empowers developers to harness real-time data for market insights, innovation in price discovery, and the development of digital asset solutions.
With the rise of cryptocurrencies and digital assets, the demand for accurate and timely information on precious metals has surged. The Metals-API provides a comprehensive suite of tools that allow developers to build next-generation applications that can analyze market trends, track fluctuations, and make informed trading decisions.
API Description
The Metals-API is a powerful tool designed for developers looking to integrate real-time metals data into their applications. It offers a variety of endpoints that provide access to exchange rates, historical data, and market insights. The API is designed with innovation in mind, allowing for seamless integration and the potential for transformative applications in the financial sector.
For detailed documentation on how to use the API, visit the Metals-API Documentation. Here, you will find comprehensive information on available endpoints, authentication, and usage examples.
Key Features and Endpoints
The Metals-API offers a range of endpoints that cater to various needs, including:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals, updated every 60 minutes, every 10 minutes, or more frequently depending on your subscription plan.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your request. This feature is invaluable for analyzing trends over time.
- Bid And Ask Endpoint: Retrieve real-time Bid and Ask prices for metals, allowing traders to make informed decisions based on current market conditions.
- Convert Endpoint: This endpoint enables you to convert any amount from one metal to another or to/from USD, facilitating easy calculations for trading.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into market movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, which is essential for understanding market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, allowing for precise calculations in jewelry and investment contexts.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period, which is critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of market trends.
- API Key: Your unique API Key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates are delivered relative to USD by default, with all data returned in a structured JSON format.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring you have access to the latest symbols.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you informed about market developments.
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
Understanding the structure of API responses is crucial for effective integration. Below are examples of various API endpoints and their corresponding JSON responses.
Latest Rates Endpoint
{
"success": true,
"timestamp": 1768126063,
"base": "USD",
"date": "2026-01-11",
"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"
}
This response indicates that the API call was successful, providing the latest exchange rates for various metals, including Gold (XAU).
Historical Rates Endpoint
{
"success": true,
"timestamp": 1768039663,
"base": "USD",
"date": "2026-01-10",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to access historical rates for Gold and other metals, allowing for analysis of past market performance.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-04",
"end_date": "2026-01-11",
"base": "USD",
"rates": {
"2026-01-04": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-06": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-11": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint provides a detailed view of exchange rates over a specified period, which is essential for trend analysis.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1768126063,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert an amount from USD to Gold (XAU), providing the conversion rate and the resulting value in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-04",
"end_date": "2026-01-11",
"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"
}
The fluctuation endpoint provides insights into how exchange rates have changed over a specified period, which is vital for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1768126063,
"base": "USD",
"date": "2026-01-11",
"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"
}
This endpoint provides critical data for technical analysis, allowing traders to assess market performance based on opening, closing, highest, and lowest prices.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1768126063,
"base": "USD",
"date": "2026-01-11",
"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"
}
The Bid/Ask endpoint is essential for traders, providing the current bid and ask prices along with the spread, which is crucial for making trading decisions.
Conclusion
Accessing Gold exchange rates through the Metals-API opens up a world of possibilities for developers and traders. With its comprehensive suite of endpoints, the API allows for real-time data retrieval, historical analysis, and market insights that are essential for informed decision-making. By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance trading strategies and provide valuable market insights.
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 Metals-API Website is your gateway to accessing real-time metals data and integrating it into your applications.