Get Dehradun Gold 24k (DEHR-24k) Historical Prices with Time Series Data using this API

Introduction
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. For developers and traders alike, accessing historical prices for gold, specifically Dehradun Gold 24k (DEHR-24k), is essential for making informed decisions. This blog post will delve into how to obtain historical prices using the Metals-API, a powerful tool that provides comprehensive data analytics and market insights for precious metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth and investment. As a digital transformation sweeps through the financial sector, the integration of technology in trading precious metals is becoming increasingly sophisticated. The Metals-API offers a suite of features that empower developers to harness data analytics for market insights, enabling innovative price discovery and digital asset solutions.
With the rise of digital currencies and blockchain technology, gold is also finding its place in the digital asset ecosystem. The ability to track historical prices and fluctuations in real-time allows traders to make data-driven decisions, enhancing their trading strategies. The Metals-API stands at the forefront of this transformation, providing developers with the tools needed to build next-generation applications that leverage real-time metals data.
Metals-API Information
The Metals-API is designed to provide developers with seamless access to a wide range of metal prices and historical data. Its capabilities extend beyond simple price retrieval; it empowers users to analyze trends, perform conversions, and track fluctuations over time. The API is built with innovation in mind, allowing for easy integration into various applications.
Key Features of Metals-API
The Metals-API offers a variety of endpoints that cater to different needs within the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for precious metals, updated according to your subscription plan. Whether you need updates every 60 minutes or every 10 minutes, this feature ensures you have the latest information at your fingertips.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your query. This feature is invaluable for traders looking to analyze past performance and make predictions based on historical data.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices, allowing traders to gauge market sentiment and make informed trading decisions.
- Convert Endpoint: Easily convert amounts between different metals or to/from USD, facilitating seamless transactions and calculations.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, enabling comprehensive analysis of price movements over time.
- Fluctuation Endpoint: Track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve gold rates by carat, which is particularly useful for jewelers and consumers looking for precise pricing.
- Lowest/Highest Price Endpoint: Query the API to find the lowest and highest prices for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Get detailed OHLC data for a specific time period, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, useful for those involved in industrial metals.
- API Key: Your unique API key is required for authentication, ensuring secure access to the API's features.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API comes with numerous endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring you have access to the latest symbols.
- Gold Price India Endpoint: Retrieve the latest gold price in India, which is particularly relevant for local traders and investors.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context to market movements.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various API endpoints and their corresponding responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the following request:
{
"success": true,
"timestamp": 1749963614,
"base": "USD",
"date": "2025-06-15",
"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"
}
This response indicates the success of the request and provides the latest rates for various metals, including gold (XAU).
Historical Rates Endpoint
Accessing historical exchange rates for any date since 1999 can be done with a simple query. Here’s an example response:
{
"success": true,
"timestamp": 1749877214,
"base": "USD",
"date": "2025-06-14",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for gold and other metals, allowing for detailed analysis of price trends over time.
Time-Series Endpoint
The time-series endpoint allows you to query for exchange rates over a specific period. Here’s an example:
{
"success": true,
"timeseries": true,
"start_date": "2025-06-08",
"end_date": "2025-06-15",
"base": "USD",
"rates": {
"2025-06-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-15": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for the specified date range, allowing for comprehensive trend analysis.
Convert Endpoint
The convert endpoint is useful for converting amounts between different metals or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1749963614,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to gold (XAU), providing both the rate and the result in troy ounces.
Fluctuation Endpoint
To track rate fluctuations between two dates, you can use the fluctuation endpoint. Here’s an example:
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-08",
"end_date": "2025-06-15",
"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 response provides insights into how prices have changed over the specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
For technical analysis, the OHLC endpoint is invaluable. Here’s an example response:
{
"success": true,
"timestamp": 1749963614,
"base": "USD",
"date": "2025-06-15",
"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 the open, high, low, and close prices for gold and other metals, essential for traders performing technical analysis.
Bid/Ask Endpoint
To get current bid and ask prices for metals, use the bid/ask endpoint. Here’s an example:
{
"success": true,
"timestamp": 1749963614,
"base": "USD",
"date": "2025-06-15",
"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 response provides the current bid and ask prices, along with the spread, which is crucial for traders looking to execute orders efficiently.
Conclusion
In conclusion, the Metals-API offers a robust and comprehensive solution for developers and traders seeking to access historical prices and real-time data for precious metals like Dehradun Gold 24k (DEHR-24k). With its extensive range of endpoints, including the latest rates, historical rates, time-series data, and more, the API empowers users to make informed decisions based on accurate and timely information.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance trading strategies, improve market insights, and facilitate seamless transactions. The integration of technology in precious metals trading is not just a trend; it is a necessity for those looking to thrive in a competitive market.
For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metal symbols. Visit the Metals-API Website to learn more about how this powerful tool can transform your trading experience.