The Easiest Way to Get Dehradun Gold 22k (DEHR-22k) Historical Rates Using API Integration

The Easiest Way to Get Dehradun Gold 22k (DEHR-22k) Historical Rates Using API Integration
In today's digital age, accessing real-time and historical data for precious metals like gold has become increasingly important for traders, investors, and developers alike. The Metals-API provides a robust solution for retrieving historical prices, including the Dehradun Gold 22k (DEHR-22k) rates. This blog post will guide you through the process of obtaining historical prices using the Metals-API, detailing its capabilities, endpoints, and practical applications.
Metals-API Information
The Metals-API is a powerful tool that allows developers to access real-time and historical data for various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). With its innovative API integration, users can leverage data analytics and market insights to make informed trading decisions. The API is designed to facilitate digital transformation in the precious metals market, enabling seamless technology integration and innovation in price discovery.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset and a hedge against inflation. In recent years, the digital transformation of precious metals has opened up new avenues for trading and investment. The integration of data analytics into the gold market allows traders to gain insights into price movements and market trends. The Metals-API empowers developers to build next-generation applications that utilize real-time metals data, enhancing the trading experience.
API Description
The Metals-API offers a comprehensive suite of features that enable users to retrieve various types of data related to precious metals. This includes real-time exchange rates, historical prices, and conversion capabilities. The API is designed to be user-friendly, providing developers with the tools they need to create innovative applications that leverage metals data.
For more detailed information, you can visit the Metals-API Documentation. This resource provides in-depth guidance on how to utilize the API effectively.
Key Features and Endpoints
The Metals-API includes several key features that cater to different data retrieval needs:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently depending on your subscription plan.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019 by appending a specific date to the endpoint. This is particularly useful for analyzing past market trends.
- Bid and Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing crucial information for traders looking to make informed decisions.
- Convert Endpoint: The API includes a currency conversion feature that enables users to convert amounts between different metals or to/from USD.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve gold rates based on carat specifications, which is essential for jewelers and traders dealing in various gold qualities.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices 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, which is vital for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, useful for those interested in industrial metals.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access.
- API Response: The API returns exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers 14 different endpoints, each providing unique functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available metal symbols, ensuring users have access to the latest data.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context to market movements.
For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective data retrieval. Below are examples of various endpoints and their corresponding JSON responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1760108446,
"base": "USD",
"date": "2025-10-10",
"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": 1760022046,
"base": "USD",
"date": "2025-10-09",
"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-10-03",
"end_date": "2025-10-10",
"base": "USD",
"rates": {
"2025-10-03": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-10-05": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-10": {
"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": 1760108446,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-03",
"end_date": "2025-10-10",
"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) Price Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1760108446,
"base": "USD",
"date": "2025-10-10",
"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": 1760108446,
"base": "USD",
"date": "2025-10-10",
"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
In conclusion, the Metals-API offers a comprehensive and innovative solution for accessing real-time and historical data for precious metals, including the Dehradun Gold 22k (DEHR-22k). By leveraging its various endpoints, developers can create applications that provide valuable insights into market trends and price movements. The API's capabilities, such as historical rates, conversion features, and fluctuation tracking, empower users to make informed trading decisions.
For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the extensive Metals-API Documentation for detailed guidance on implementation. By utilizing this powerful API, you can stay ahead in the dynamic world of precious metals trading.