The Easiest Way to Get Gold Nov 2026 (GCX26) Historical Rates in API Documentation
The Easiest Way to Get Gold Nov 2026 (GCX26) Historical Rates in API Documentation
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. For developers looking to integrate gold (XAU) historical prices into their applications, the Metals-API offers a robust solution. This blog post will guide you through the process of retrieving historical gold prices using the Metals-API, including detailed explanations of endpoints, parameters, and data formats. By the end of this article, you will have a comprehensive understanding of how to leverage this powerful API for your financial applications.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, making it a popular choice for investors and traders alike. As the digital transformation continues to reshape the financial landscape, the integration of technology in precious metals trading is becoming increasingly important. The Metals-API stands at the forefront of this transformation, providing developers with the tools needed to access real-time and historical data on gold and other metals.
With the rise of data analytics and market insights, understanding the historical trends of gold prices can provide valuable context for current market conditions. The Metals-API enables developers to harness the power of technology in trading by offering innovative solutions for price discovery and digital asset management. By utilizing this API, you can create applications that not only track gold prices but also analyze market trends and fluctuations.
API Description
The Metals-API is a powerful JSON API that provides access to real-time and historical prices for various metals, including gold (XAU). This API empowers developers to build next-generation applications that require accurate and timely metals data. With a user-friendly interface and comprehensive documentation, the Metals-API simplifies the process of integrating precious metals data into your applications.
For more information, visit the Metals-API Website or check out the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for gold and other metals. Depending on your subscription plan, the API updates this data every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Access historical rates for gold dating back to 2019. You can query the Metals-API for historical rates by appending a specific date in the format YYYY-MM-DD.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for gold, allowing you to understand market dynamics better.
- Convert Endpoint: This endpoint allows you to convert any amount from one metal to another or to/from USD, making it easy to handle transactions in different currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into price trends over time.
- Fluctuation Endpoint: Track how gold prices fluctuate on a day-to-day basis, helping you identify patterns and make informed trading decisions.
- Carat Endpoint: Retrieve information about gold rates by carat, which is essential for jewelers and those dealing in fine gold.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for gold over a specified period, allowing for better market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for gold, which are critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- 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.
- Available Endpoints: The Metals-API includes 14 different endpoints, each offering unique functionalities to cater to various needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals supported by the API.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you informed about market developments.
For a complete list of all supported symbols, refer to the Metals-API Supported Symbols.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective integration. Below are examples of various endpoints, including their expected responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1778155651,
"base": "USD",
"date": "2026-05-07",
"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": 1778069251,
"base": "USD",
"date": "2026-05-06",
"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-04-30",
"end_date": "2026-05-07",
"base": "USD",
"rates": {
"2026-04-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-05-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-05-07": {
"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": 1778155651,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-30",
"end_date": "2026-05-07",
"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": 1778155651,
"base": "USD",
"date": "2026-05-07",
"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": 1778155651,
"base": "USD",
"date": "2026-05-07",
"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
In conclusion, the Metals-API provides a comprehensive and powerful solution for developers looking to access gold (XAU) historical prices and other precious metals data. By utilizing the various endpoints offered by the API, you can create applications that not only track real-time prices but also analyze historical trends and fluctuations. The ability to convert between different metals and currencies, along with access to bid and ask prices, enhances your application's functionality and provides users with valuable insights.
As you embark on your journey to integrate the Metals-API into your applications, remember to explore the extensive documentation available at the Metals-API Documentation. Additionally, familiarize yourself with the Metals-API Supported Symbols to ensure you are utilizing the correct parameters in your queries. With the right tools and knowledge, you can harness the power of real-time metals data to create innovative financial applications that meet the needs of today's market.