Fetch Dehradun Gold 22k (DEHR-22k) Historical Prices through this API

Introduction
In the ever-evolving landscape of precious metals trading, the ability to access historical prices is crucial for investors, traders, and developers alike. One of the most sought-after metals is Gold, represented by the symbol XAU. With the rise of digital transformation in the financial sector, tools like the Metals-API have emerged, providing real-time and historical data that empowers users to make informed decisions. This blog post will delve into the historical prices of Dehradun Gold 22k (DEHR-22k) and explore how to effectively utilize the Metals-API to fetch this data.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability. 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 technology, traders can now leverage real-time insights to make better investment decisions. The Metals-API plays a pivotal role in this transformation, offering a robust platform for accessing gold prices and other metal data.
The innovation in price discovery facilitated by APIs like Metals-API allows developers to create applications that provide users with up-to-date market insights. This is particularly important in a volatile market where prices can fluctuate rapidly. By utilizing the Metals-API, developers can build next-generation applications that not only track prices but also analyze trends and provide predictive insights.
API Description
The Metals-API is a powerful tool designed for developers seeking to integrate metals pricing data into their applications. With a focus on innovation and technological advancement, this API enables users to access real-time and historical data for various metals, including gold, silver, platinum, and palladium. The API's capabilities extend beyond mere price retrieval; it empowers developers to create applications that can analyze market trends, convert currencies, and track fluctuations over time.
One of the standout features of the Metals-API is its ability to provide historical rates dating back to 2019. This functionality is essential for developers looking to build applications that require historical data analysis. By appending a specific date to the API request, users can retrieve historical prices for gold and other metals, making it a valuable resource for market analysis.
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 provides real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This is crucial for traders who need the latest market information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a date to the API request, developers can retrieve historical prices for gold and other metals.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing dynamics.
- 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.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it ideal for trend analysis.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest price for a specified date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, useful for those involved in industrial metals.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a comprehensive list of endpoints, each designed to fulfill specific data retrieval needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, allowing users to stay updated on the latest symbols.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: This feature allows users to access the latest news articles related to various metals, keeping them informed about 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
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various endpoints and their responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1749704413,
"base": "USD",
"date": "2025-06-12",
"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": 1749618013,
"base": "USD",
"date": "2025-06-11",
"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-06-05",
"end_date": "2025-06-12",
"base": "USD",
"rates": {
"2025-06-05": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-07": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-12": {
"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": 1749704413,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-05",
"end_date": "2025-06-12",
"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": 1749704413,
"base": "USD",
"date": "2025-06-12",
"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": 1749704413,
"base": "USD",
"date": "2025-06-12",
"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 provides a comprehensive and innovative solution for accessing historical prices of precious metals like Gold (XAU). By leveraging its various endpoints, developers can create applications that not only fetch real-time data but also analyze historical trends, track fluctuations, and convert currencies. The ability to access detailed market insights empowers traders and investors to make informed decisions in a rapidly changing market.
For developers looking to integrate this powerful API into their applications, the Metals-API Documentation offers extensive guidance on usage, including endpoint descriptions, response formats, and practical examples. Additionally, the Metals-API Supported Symbols page provides a complete list of available symbols, ensuring that users can easily find the data they need.
In a world where data-driven decisions are paramount, the Metals-API stands out as a vital tool for anyone involved in the precious metals market. By utilizing this API, developers can harness the power of real-time data to create innovative solutions that meet the demands of modern trading.