The Easiest Way to Get Delhi Gold (XAU-DELH) Historical Rates in Your API Application
The Easiest Way to Get Delhi Gold (XAU-DELH) Historical Rates in Your API Application
In the world of finance and trading, having access to accurate and timely data is crucial. For developers looking to integrate precious metals pricing into their applications, the Metals-API offers a powerful solution. This blog post will guide you through the process of obtaining historical prices for Gold (XAU) using the Metals-API, including example endpoints, parameters, and data formats. By the end of this post, you will have a comprehensive understanding of how to leverage this API for your applications.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of financial markets. As a precious metal, it is not only a store of value but also a hedge against inflation and currency fluctuations. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. With the integration of technology, traders can now access real-time data, enhancing their decision-making processes.
In recent years, innovation in price discovery has led to the development of digital asset solutions that allow for more efficient trading of gold. The Metals-API is at the forefront of this transformation, providing developers with the tools needed to build next-generation applications that can access and analyze gold pricing data seamlessly.
API Description
The Metals-API is a robust JSON API that provides real-time and historical pricing data for various metals, including Gold (XAU). This API empowers developers to create applications that can track market trends, analyze price movements, and make informed trading decisions. With its 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 for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Hereβs a breakdown of some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, every 10 minutes, or even more frequently, depending on your subscription plan. It allows developers to access the most current pricing information for Gold and other metals.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. By appending a specific date to the endpoint, developers can retrieve past pricing data for Gold, enabling them to analyze trends over time.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices for metals, providing insight into market liquidity and pricing dynamics.
- Convert Endpoint: The conversion endpoint enables users to convert any amount from one metal to another or to/from USD, making it easier to perform calculations and analyses.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis with this endpoint, which provides valuable insights into market volatility.
- Carat Endpoint: Retrieve information about Gold rates by carat, which is essential for jewelers and those in the jewelry industry.
- Lowest/Highest Price Endpoint: This endpoint allows you to query the API to get the lowest and highest prices for Gold over a specified period, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed OHLC data for a specific time period, which is crucial for technical analysis and trading strategies.
- 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 essential for accessing the API and must be included in your requests.
- API Response: The API delivers exchange rates relative to USD, with all data returned in a structured JSON format.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, allowing developers to stay informed about the latest symbols.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you updated on market developments.
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.
API Endpoint Examples and Responses
To illustrate the functionality of the Metals-API, here are some example responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1767918453,
"base": "USD",
"date": "2026-01-09",
"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 of Gold per troy ounce, along with other metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1767832053,
"base": "USD",
"date": "2026-01-08",
"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 for a specific date. Developers can use this data to analyze past performance and trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-02",
"end_date": "2026-01-09",
"base": "USD",
"rates": {
"2026-01-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-09": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides daily historical rates for Gold over a specified period. This data is invaluable for traders looking to identify patterns and make predictions based on historical performance.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1767918453,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates the conversion of an amount from USD to Gold (XAU). The "result" field indicates how many troy ounces of Gold can be purchased with the specified amount of USD.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-02",
"end_date": "2026-01-09",
"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 the price of Gold has changed over a specified period. This information is crucial for traders looking to understand market dynamics and make informed decisions.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1767918453,
"base": "USD",
"date": "2026-01-09",
"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 response provides OHLC data for Gold, which is essential for traders who rely on technical analysis to make trading decisions. The "open," "high," "low," and "close" fields provide a comprehensive view of market activity for the specified date.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1767918453,
"base": "USD",
"date": "2026-01-09",
"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"
}
The bid/ask endpoint provides current bid and ask prices for Gold, allowing traders to assess market conditions and make informed buying or selling decisions.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers looking to integrate historical and real-time pricing data for Gold (XAU) into their applications. With a wide range of endpoints, including the latest rates, historical rates, and fluctuation tracking, the API provides the tools necessary to analyze market trends and make informed trading decisions.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance the trading experience, provide market insights, and facilitate data-driven decision-making. For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals.
Embrace the digital transformation in precious metals trading and unlock the potential of real-time data with the Metals-API. Start building your application today and stay ahead in the ever-evolving world of finance.