Get Gold Apr 2026 (GCJ26) Historical Prices via REST API for Your Applications
Get Gold Apr 2026 (GCJ26) Historical Prices via REST API for Your Applications
In the world of finance and investment, the demand for accurate and timely data is paramount, especially when it comes to precious metals like gold. The Metals-API provides a robust solution for developers looking to integrate historical prices of gold (symbol: XAU) into their applications. This blog post will explore how to effectively utilize the Metals-API to access historical prices, focusing on the innovative capabilities of this API and the transformative potential it holds for developers and businesses alike.
About Gold (XAU)
Gold has been a symbol of wealth and a standard for monetary systems for centuries. In recent years, the digital transformation in precious metals trading has opened new avenues for investors and developers. The integration of data analytics and market insights into trading strategies has become essential for making informed decisions. With the rise of technology, the way we discover prices and trade gold has evolved significantly.
Digital asset solutions are now at the forefront of this transformation, allowing for real-time tracking and analysis of gold prices. The Metals-API stands out as a powerful tool that empowers developers to build next-generation applications that can leverage historical data, real-time pricing, and market trends. By utilizing the Metals-API, developers can create applications that not only track gold prices but also analyze trends, forecast future movements, and provide valuable insights to users.
API Description
The Metals-API is a comprehensive JSON API designed to provide real-time and historical data on precious metals. It offers a wide range of endpoints that allow developers to access various functionalities, including the retrieval of historical prices, real-time rates, and conversion capabilities. The API is built with innovation in mind, enabling seamless integration into applications that require accurate and timely metals data.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on the subscription plan, the API can provide updates every 60 minutes, every 10 minutes, or even more frequently. This level of granularity ensures that developers have access to the most current data available, which is crucial for applications that rely on up-to-the-minute pricing information.
For developers looking to access historical prices, the Metals-API offers endpoints that allow querying of historical rates dating back to 2019. This capability is essential for applications that require historical data analysis, enabling users to track price movements over time and make informed investment decisions.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to cater to specific needs. Here are some of the key features and their potential applications:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. Developers can access the latest prices for gold, silver, platinum, and more, ensuring that their applications reflect the most current market conditions.
- Historical Rates Endpoint: Developers can retrieve historical rates for gold and other metals by appending a specific date to the API request. This feature is invaluable for applications that analyze past price trends and make predictions based on historical data.
- Bid And Ask Endpoint: This powerful feature allows developers to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This functionality is essential for applications that require multi-currency support.
- Time-Series Endpoint: This endpoint allows developers to query the API for daily historical rates between two dates of their choice. It is particularly useful for applications that need to analyze price movements over specific time frames.
- Fluctuation Endpoint: Developers can track how metal prices fluctuate on a day-to-day basis using this endpoint. It provides insights into market volatility and helps users understand price trends.
- Carat Endpoint: This feature allows developers to retrieve gold rates by carat, catering to applications that require precise measurements for jewelry and other gold products.
- Lowest/Highest Price Endpoint: Developers can query the API to get the lowest and highest prices for a specified date, which is crucial for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, allowing for extensive historical analysis.
- API Key: Each developer is assigned a unique API key, which must be included in API requests to authenticate access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Available Endpoints: The API offers 14 different endpoints, each providing unique functionalities to cater to various developer needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring developers have access to the latest symbols.
- News Endpoint: Developers can retrieve the latest news articles related to various metals, providing context and insights into market movements.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1764119010,
"base": "USD",
"date": "2025-11-26",
"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": 1764032610,
"base": "USD",
"date": "2025-11-25",
"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": "2025-11-19",
"end_date": "2025-11-26",
"base": "USD",
"rates": {
"2025-11-19": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-21": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-11-26": {
"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": 1764119010,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-19",
"end_date": "2025-11-26",
"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": 1764119010,
"base": "USD",
"date": "2025-11-26",
"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": 1764119010,
"base": "USD",
"date": "2025-11-26",
"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 an invaluable resource for developers looking to integrate historical prices of gold and other precious metals into their applications. With its extensive range of endpoints, real-time data capabilities, and user-friendly documentation, the API empowers developers to create innovative solutions that leverage the power of metals data.
By utilizing the Metals-API, developers can not only access historical prices but also gain insights into market trends, track fluctuations, and convert between different metals and currencies. This level of functionality is essential for building applications that meet the demands of today's fast-paced financial markets.
For more information on how to get started with the Metals-API, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals. Embrace the future of precious metals trading by integrating the Metals-API into your applications today!