Obtain Gold Bid (XAU-BID) - Per Ounce prices via this API

Introduction
In the ever-evolving landscape of financial markets, obtaining accurate and real-time data on precious metals is crucial for traders, investors, and developers alike. One of the most sought-after commodities is gold, represented by the symbol XAU. The Metals-API provides a robust solution for accessing gold bid (XAU-BID) prices per ounce, along with a plethora of other features that empower developers to create innovative applications. This blog post delves into the intricacies of the Metals-API, exploring its capabilities, endpoints, and the transformative potential it holds for the trading of precious metals.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, often serving as a hedge against inflation and economic uncertainty. In recent years, the digital transformation of precious metals has gained momentum, driven by advancements in technology and data analytics. The integration of real-time data into trading platforms has revolutionized how investors approach the gold market.
With the rise of digital asset solutions, traders can now leverage data analytics to gain insights into market trends, price movements, and trading strategies. The Metals-API plays a pivotal role in this transformation, offering developers the tools needed to access and analyze gold prices in real-time. By utilizing this API, developers can create applications that not only track gold prices but also provide predictive analytics and market insights.
API Description
The Metals-API is a powerful tool designed to provide real-time and historical data on various metals, including gold, silver, platinum, and palladium. It offers a range of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data and fluctuations. The API's capabilities enable developers to build next-generation applications that can analyze market trends, optimize trading strategies, and enhance decision-making processes.
For detailed information on how to implement the API, developers can refer to the Metals-API Documentation. This resource provides comprehensive guidance on authentication, endpoint usage, and response handling, ensuring that developers can effectively integrate the API into their applications.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to fulfill specific requirements. Below are some of the key features and their potential applications:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for various metals, including gold. Depending on the subscription plan, this endpoint can return updated rates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to make quick decisions based on the latest market conditions.
{
"success": true,
"timestamp": 1751504701,
"base": "USD",
"date": "2025-07-03",
"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
For those interested in analyzing past market trends, the Historical Rates Endpoint allows users to access exchange rates dating back to 2019. By appending a specific date to the API request, developers can retrieve historical data that can be used for backtesting trading strategies or conducting market analysis.
{
"success": true,
"timestamp": 1751418301,
"base": "USD",
"date": "2025-07-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables developers to retrieve real-time bid and ask prices for metals. This information is crucial for traders looking to execute orders at the best possible prices. The bid price represents the highest price a buyer is willing to pay, while the ask price is the lowest price a seller is willing to accept.
{
"success": true,
"timestamp": 1751504701,
"base": "USD",
"date": "2025-07-03",
"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"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders who need to quickly assess the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1751504701,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint enables developers to query the API for daily historical rates between two specified dates. This feature is invaluable for conducting trend analysis and understanding price movements over time.
{
"success": true,
"timeseries": true,
"start_date": "2025-06-26",
"end_date": "2025-07-03",
"base": "USD",
"rates": {
"2025-06-26": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-28": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides insights into how metal prices fluctuate on a day-to-day basis. This information can help traders identify patterns and make informed decisions based on historical volatility.
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-26",
"end_date": "2025-07-03",
"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"
}
Carat Endpoint
The Carat Endpoint allows users to retrieve information about gold rates by carat. This feature is particularly useful for jewelers and consumers looking to understand the value of gold based on its purity.
{
"success": true,
"timestamp": 1751504701,
"base": "USD",
"date": "2025-07-03",
"rates": {
"XAU": {
"carat_24": 0.000482,
"carat_22": 0.000442,
"carat_18": 0.000367
}
},
"unit": "per troy ounce"
}
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint allows users to query the API to get the lowest and highest price of a metal over a specified period. This information is crucial for traders looking to identify price extremes and make strategic decisions.
{
"success": true,
"timestamp": 1751504701,
"base": "USD",
"date": "2025-07-03",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
The Open/High/Low/Close (OHLC) Price Endpoint provides users with the open, high, low, and close prices for a specific time period. This data is essential for technical analysis and helps traders assess market trends.
{
"success": true,
"timestamp": 1751504701,
"base": "USD",
"date": "2025-07-03",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for traders and analysts looking to study long-term trends in the metals market.
{
"success": true,
"timestamp": 1751418301,
"base": "USD",
"date": "2025-07-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825
},
"unit": "per troy ounce"
}
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols, including but not limited to:
- XAU - Gold
- XAG - Silver
- XPT - Platinum
- XPD - Palladium
For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
Conclusion
The Metals-API is an invaluable resource for developers looking to integrate real-time and historical data on precious metals into their applications. With its extensive range of endpoints, including the Latest Rates, Historical Rates, Bid and Ask, and many more, the API empowers users to make informed trading decisions based on accurate data. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance market analysis, trading strategies, and overall decision-making processes.
For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the comprehensive Metals-API Documentation for detailed guidance on implementation and usage.