API Guide: Get Gold Mar 2026 (GCH26) Historical Prices
API Guide: Get Gold Mar 2026 (GCH26) Historical Prices
As the world of finance continues to evolve, the importance of accurate and timely data in trading precious metals like gold (XAU) cannot be overstated. The Metals-API provides a powerful solution for developers looking to access historical prices and real-time data for gold and other metals. This guide will explore the capabilities of the Metals-API, focusing on how to retrieve historical prices for gold, along with insights into the digital transformation in precious metals trading.
About Gold (XAU)
Gold has long been regarded as a safe haven asset, especially during times of economic uncertainty. Its value is influenced by various factors, including market demand, geopolitical events, and currency fluctuations. In recent years, the digital transformation in precious metals has opened up new avenues for trading and investment. With advancements in data analytics and technology integration, traders can now leverage real-time data to make informed decisions.
The Metals-API stands at the forefront of this transformation, offering developers the tools they need to build next-generation applications that can analyze market trends and provide insights into price discovery. By utilizing the API, developers can access a wealth of information, including historical prices, bid and ask rates, and conversion capabilities, all of which are essential for effective trading strategies.
API Description
The Metals-API is a robust platform that provides real-time and historical data for various metals, including gold. It empowers developers to create applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. The API is designed with innovation in mind, allowing for easy integration into existing systems and applications.
For more detailed information about the API's features and capabilities, you can visit the Metals-API Documentation. This resource provides comprehensive guidance on how to utilize the API effectively.
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: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is crucial for traders who need the most current information to make quick decisions.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. You can query the Metals-API for historical rates by appending a date (YYYY-MM-DD) to the endpoint. This is particularly useful for analyzing past trends and making predictions based on historical data.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices, which are essential for understanding market dynamics and making informed trading decisions.
- Convert Endpoint: The Metals-API includes a separate currency conversion endpoint, enabling users to convert any amount from one currency to another. This is particularly useful for traders dealing with multiple currencies.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice. It is invaluable for analyzing trends over specific periods.
- Fluctuation Endpoint: With this endpoint, you can retrieve information about how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This feature allows you to retrieve information about gold rates by carat, which is essential for jewelers and those dealing in precious metals.
- Lowest/Highest Price Endpoint: This endpoint enables you to query the API to get the lowest and highest price for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Your API Key is the unique identifier that grants access to the API. It must be included in your requests to authenticate your access.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API comes with 14 API endpoints, each providing different functionalities tailored to various trading needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring you have the latest information at your fingertips.
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": 1782260322,
"base": "USD",
"date": "2026-06-24",
"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": 1782173922,
"base": "USD",
"date": "2026-06-23",
"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-06-17",
"end_date": "2026-06-24",
"base": "USD",
"rates": {
"2026-06-17": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-19": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-24": {
"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": 1782260322,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-17",
"end_date": "2026-06-24",
"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": 1782260322,
"base": "USD",
"date": "2026-06-24",
"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": 1782260322,
"base": "USD",
"date": "2026-06-24",
"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 transformative tool for developers looking to access historical prices and real-time data for gold and other precious metals. By leveraging its various endpoints, developers can create applications that provide valuable insights into market trends, price fluctuations, and trading strategies. The API's capabilities, such as the Latest Rates, Historical Rates, and Conversion features, empower users to make informed decisions based on accurate data.
As the financial landscape continues to evolve, integrating advanced data analytics and technology into trading practices will be essential. The Metals-API not only facilitates this integration but also enhances the overall trading experience. For more information on how to get started, visit the Metals-API Website and explore the extensive Metals-API Documentation to unlock the full potential of this powerful API.