Request Delhi Gold (XAU-DELH) Historical Prices via this API
Request Delhi Gold (XAU-DELH) Historical Prices via this API
In the ever-evolving landscape of financial technology, the demand for accurate and real-time data has never been more critical, especially in the realm of precious metals trading. One of the most sought-after assets in this domain is Gold, represented by the symbol XAU. The ability to access historical prices for Gold, particularly in specific markets like Delhi, can provide traders and investors with invaluable insights into market trends and price movements. This blog post will delve into how to retrieve historical prices for Gold (XAU) using the Metals-API, a powerful tool that empowers developers to integrate real-time metals data into their applications.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and currency fluctuations. In recent years, the digital transformation in precious metals trading has revolutionized how investors access and analyze market data. With the integration of data analytics and advanced technology, traders can now leverage market insights to make informed decisions. The Metals-API stands at the forefront of this transformation, offering innovative solutions for price discovery and digital asset management.
As the market for Gold continues to evolve, the importance of real-time data cannot be overstated. The Metals-API provides developers with the tools necessary to build next-generation applications that can track Gold prices, analyze historical trends, and even forecast future movements. By utilizing advanced data analytics, traders can gain a competitive edge in the market, making the Metals-API an essential resource for anyone involved in precious metals trading.
API Description
The Metals-API is designed to deliver comprehensive and real-time data on precious metals, including Gold (XAU), Silver (XAG), Platinum (XPT), and Palladium (XPD). With a focus on innovation and technological advancement, this API enables developers to create applications that can access a wealth of information about metal prices, market trends, and historical data.
One of the standout features of the Metals-API is its ability to provide historical rates for most currencies dating back to 2019. This capability allows users to query the API for historical rates by appending a specific date to the request. For example, if a developer wants to retrieve the historical price of Gold on a particular date, they can easily do so with a simple API call.
For more detailed information on how to implement this API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on all available endpoints and their functionalities.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs in the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data for Gold and other metals, updated every 60 minutes, every 10 minutes, or even more frequently. This feature is crucial for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Users can access historical exchange rates for any date since 1999. This endpoint is particularly useful for analyzing past trends and making informed predictions about future price movements. For instance, if a trader wants to know the price of Gold on March 1, 2023, they can easily retrieve this data.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time Bid and Ask prices for Gold and other metals. Understanding the spread between these prices is essential for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. For example, a trader might want to analyze the price movements of Gold over the past month to identify trends.
- Fluctuation Endpoint: Users can track how Gold prices fluctuate on a day-to-day basis using this endpoint. This feature provides insights into market volatility, which can be critical for risk management.
- Carat Endpoint: This unique feature allows users to retrieve information about Gold rates by Carat. This is particularly useful for jewelers and those in the jewelry industry who need precise measurements for their products.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest price of Gold for a specified date. This information can help traders identify potential entry and exit points in the market.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for Gold on a specific date, allowing traders to analyze daily price movements.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a broader perspective on market trends.
- API Key: Each user is provided with a unique API Key, which must be included in the API requests to authenticate access to the data.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API features 14 different endpoints, each designed to provide specific functionalities tailored to the needs of traders and developers.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metal symbols, allowing users to stay informed about the latest offerings.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them updated on market developments.
For a complete list of all supported symbols, including Gold (XAU), traders can refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, here are some examples of API responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1774311605,
"base": "USD",
"date": "2026-03-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"
}
The above response shows the latest exchange rates for various metals, including Gold (XAU). The "rates" object contains the current price per troy ounce, which is essential for traders looking to make immediate decisions.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1774225205,
"base": "USD",
"date": "2026-03-23",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical exchange rates for Gold and other metals on a specific date. Traders can use this data to analyze past performance and make informed predictions about future price movements.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-03-17",
"end_date": "2026-03-24",
"base": "USD",
"rates": {
"2026-03-17": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-19": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-24": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response allows users to track the price movements of Gold over a specified period, providing valuable insights into market trends.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1774311605,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows how much Gold can be purchased with a specified amount of USD. The "result" field indicates the equivalent amount in troy ounces, which is crucial for traders looking to convert currencies.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-17",
"end_date": "2026-03-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"
}
This endpoint provides insights into how Gold prices fluctuate over a specified period, allowing traders to assess market volatility and make informed decisions.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1774311605,
"base": "USD",
"date": "2026-03-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"
}
The OHLC response provides a comprehensive view of the price movements for Gold throughout the day, allowing traders to analyze market behavior and make strategic decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1774311605,
"base": "USD",
"date": "2026-03-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"
}
This endpoint provides the current bid and ask prices for Gold, which is essential for traders looking to optimize their buying and selling strategies.
Conclusion
In conclusion, the Metals-API offers a robust and comprehensive solution for accessing historical prices and real-time data for Gold (XAU) and other precious metals. By leveraging the various endpoints available, developers can create powerful applications that provide traders with the insights they need to make informed decisions in the fast-paced world of precious metals trading.
With features like the Latest Rates Endpoint, Historical Rates Endpoint, and the ability to track fluctuations, the Metals-API is an invaluable resource for anyone looking to gain a competitive edge in the market. For more information on how to get started with the Metals-API, be sure to check out the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available options.
As the market for precious metals continues to evolve, staying informed and utilizing the right tools will be key to success. The Metals-API not only provides access to essential data but also empowers developers to innovate and create solutions that can transform the way we trade and invest in precious metals.