Visualize Gold Sep 2025 (GCU25) Historical Prices using this API
Visualize Gold Sep 2025 (GCU25) Historical Prices using this API
In the ever-evolving landscape of financial markets, the ability to visualize and analyze historical prices of precious metals like gold (XAU) is crucial for traders, investors, and analysts. The Metals-API offers a powerful solution for accessing real-time and historical data on gold prices, enabling developers to create innovative applications that leverage this information. This blog post will explore the capabilities of the Metals-API, focusing on how to retrieve historical prices for gold, particularly for the September 2025 contract (GCU25), and the transformative potential of real-time metals data.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset and a hedge against inflation. As the world undergoes digital transformation, the precious metals market is also evolving. The integration of data analytics and technology in trading has opened new avenues for market insights and price discovery. Developers can harness the power of the Metals-API to create applications that provide real-time data, historical trends, and predictive analytics for gold prices.
With the rise of digital asset solutions, understanding the historical prices of gold is more important than ever. The Metals-API allows users to access a wealth of information, including the latest rates, historical data, and various endpoints that cater to different analytical needs. By leveraging this API, developers can build next-generation applications that empower users with actionable insights into the gold market.
API Description
The Metals-API is a comprehensive JSON API that provides access to real-time and historical prices of various metals, including gold (XAU). It is designed to empower developers to create applications that require accurate and timely metals data. The API supports multiple endpoints that cater to different functionalities, making it a versatile tool for financial analysis and trading.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated at intervals depending on the user's subscription plan. This capability is essential for traders who need to make informed decisions based on the latest market conditions. Additionally, the API offers historical rates dating back to 2019, allowing users to analyze price trends over time.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints that provide different functionalities, each with unique applications:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. This is crucial for traders who need to react quickly to market changes.
- Historical Rates Endpoint: Users can access historical rates for gold and other metals by appending a specific date to the API request. This feature is invaluable for analyzing past performance and making predictions about future trends.
- Bid And Ask Endpoint: This endpoint provides real-time bid and ask prices for metals, allowing traders to gauge market sentiment and make informed trading decisions.
- Convert Endpoint: The Metals-API includes a currency conversion feature, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and those in the luxury goods market.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specific date, helping them 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 critical for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, allowing users to analyze long-term trends.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API features 14 endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
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. This resource is essential for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints, including their responses and explanations of the fields returned.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1784765603,
"base": "USD",
"date": "2026-07-23",
"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"
}
In this response, the success field indicates whether the request was successful. The timestamp provides the time of the request, while base shows the base currency (USD). The rates object contains the exchange rates for various metals, with each metal symbol as a key. The unit indicates the measurement unit used.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1784679203,
"base": "USD",
"date": "2026-07-22",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specific date. Similar to the latest rates, the success field indicates the request's success, and the rates object contains the exchange rates for the specified date.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-16",
"end_date": "2026-07-23",
"base": "USD",
"rates": {
"2026-07-16": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-18": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-23": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to retrieve rates for multiple dates within a specified range. The rates object contains nested objects for each date, providing the exchange rates for that day.
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": 1784765603,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the result of converting 1000 USD to gold (XAU). The query object details the conversion parameters, while the result field provides the converted amount in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-16",
"end_date": "2026-07-23",
"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 prices have changed over a specified period. The rates object contains details about the starting and ending rates, as well as the absolute and percentage changes.
OHLC (Open/High/Low/Close) Price Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1784765603,
"base": "USD",
"date": "2026-07-23",
"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 a comprehensive view of price movements for a specific date, including the opening, highest, lowest, and closing prices. This data is essential for technical analysis and trading strategies.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1784765603,
"base": "USD",
"date": "2026-07-23",
"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"
}
This response provides the current bid and ask prices for metals, along with the spread. Understanding these values is crucial for traders looking to execute buy and sell orders effectively.
Conclusion
The Metals-API is a powerful tool for developers looking to access real-time and historical data on gold prices. By utilizing the various endpoints offered by the API, developers can create applications that provide valuable insights into the precious metals market. Whether you are interested in analyzing historical trends, tracking price fluctuations, or converting between different metals, the Metals-API has the capabilities to meet your needs.
As the financial landscape continues to evolve, the integration of technology and data analytics in trading will only become more critical. By leveraging the Metals-API, developers can stay ahead of the curve and provide users with the information they need to make informed decisions in the precious metals market. For more information on how to get started, refer to the Metals-API Documentation and explore the extensive features available.