Get Dehradun Gold 18k (DEHR-18k) Historical Prices in JSON format using this API
Get Dehradun Gold 18k (DEHR-18k) Historical Prices in JSON format using this API
In the world of precious metals, gold stands out as a symbol of wealth and stability. For developers and financial analysts, accessing historical prices of gold, such as the Dehradun Gold 18k (DEHR-18k), is crucial for making informed decisions. The Metals-API provides a robust solution for retrieving historical prices in JSON format, enabling users to integrate this data into their applications seamlessly. This blog post will delve into the capabilities of the Metals-API, focusing on how to access historical prices and the innovative features that make it an essential tool for developers.
About Gold (XAU)
Gold, represented by the symbol XAU, has undergone a digital transformation in recent years. The integration of technology in trading has revolutionized how investors access market insights and data analytics. With the rise of digital asset solutions, the demand for real-time data on precious metals has surged. The Metals-API stands at the forefront of this transformation, offering developers the tools necessary to harness the power of data analytics for gold trading.
As the market for gold continues to evolve, understanding historical prices is vital for price discovery and investment strategies. The Metals-API allows users to access historical rates dating back to 2019, providing a comprehensive view of gold's price fluctuations over time. This capability is essential for developers looking to build applications that require accurate and timely data on gold prices.
API Description
The Metals-API is a powerful tool that empowers developers to build next-generation applications by providing real-time and historical data on precious metals. With a focus on innovation and technological advancement, this API enables users to access a wealth of information that can transform how they approach trading and investment in metals.
One of the standout features of the Metals-API is its ability to deliver exchange rate data updated at various intervals, depending on the user's subscription plan. This flexibility allows developers to tailor their applications to meet specific needs, whether they require real-time data or historical insights.
For detailed information on how to use the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on all available endpoints and features.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to provide specific functionalities that cater to the needs of developers and analysts. Here are some of the key features:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for precious metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. This feature is invaluable for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve the historical price of gold, allowing for in-depth analysis of price trends over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for gold and other metals. Understanding the bid-ask spread is crucial for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that allows users to convert amounts from one metal to another or to/from USD. This feature is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two chosen dates. This endpoint is essential for analyzing price movements over specific periods, enabling users to identify trends and make informed decisions.
- Fluctuation Endpoint: This endpoint provides information about how metal prices fluctuate on a day-to-day basis. By tracking these fluctuations, developers can gain insights into market volatility and adjust their strategies accordingly.
- Carat Endpoint: Users can retrieve information about gold rates by carat, allowing for precise calculations based on the purity of gold. This feature is particularly relevant for jewelers and gold traders.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices of gold over a specified period, providing valuable insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access OHLC data for specific time periods, which is crucial for technical analysis and understanding market behavior.
- 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 assigned a unique API key, which must be included in the API requests to authenticate access. This security measure ensures that only authorized users can access the data.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation. All responses are returned in JSON format, making them easy to integrate into applications.
- Available Endpoints: The API features 14 endpoints, each providing distinct functionalities, allowing developers to choose the features that best suit their needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring that developers have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, providing context and insights into market movements.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols, including but not limited to:
- XAU - Gold
- XAG - Silver
- XPT - Platinum
- XPD - Palladium
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 interpret the API responses is crucial for effective integration. 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": 1772237957,
"base": "USD",
"date": "2026-02-28",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1772151557,
"base": "USD",
"date": "2026-02-27",
"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": "2026-02-21",
"end_date": "2026-02-28",
"base": "USD",
"rates": {
"2026-02-21": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-02-23": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-28": {
"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": 1772237957,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-21",
"end_date": "2026-02-28",
"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": 1772237957,
"base": "USD",
"date": "2026-02-28",
"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": 1772237957,
"base": "USD",
"date": "2026-02-28",
"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 is an invaluable resource for developers and analysts looking to access historical prices of gold, including the Dehradun Gold 18k (DEHR-18k). With its comprehensive range of endpoints, the API provides real-time and historical data that can be seamlessly integrated into applications. By leveraging the capabilities of the Metals-API, developers can gain insights into market trends, optimize trading strategies, and enhance their applications with accurate and timely data.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation and explore the various endpoints available. Additionally, check out the Metals-API Supported Symbols page for a complete list of metal symbols. With the right tools and data at your fingertips, you can take your trading and investment strategies to the next level.