Obtain Dehradun Gold 22k (DEHR-22k) Historical Prices with this API

Obtain Dehradun Gold 22k (DEHR-22k) Historical Prices with this API
In the world of precious metals trading, obtaining accurate and timely data is crucial for making informed decisions. For developers and traders interested in gold, the Metals-API provides a powerful solution to access historical prices, including the Dehradun Gold 22k (DEHR-22k). This blog post will explore how to leverage the Metals-API to retrieve historical prices for gold and other precious metals, while also delving into the broader implications of digital transformation in the precious metals market.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a symbol of wealth and stability. As a precious metal, it plays a vital role in global finance and investment. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. With the integration of technology in trading, investors can now access real-time data, allowing for innovative price discovery and enhanced decision-making.
As the market evolves, the demand for digital asset solutions continues to grow. The Metals-API is at the forefront of this transformation, providing developers with the tools necessary to build next-generation applications that can analyze and interpret gold price trends effectively.
API Description
The Metals-API is a robust platform that offers real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API empowers developers to create applications that can track price fluctuations, analyze trends, and convert currencies seamlessly. With its innovative capabilities, the Metals-API is transforming how traders and investors interact with precious metals data.
For detailed information on how to use the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on endpoints, parameters, and response formats. Additionally, the Symbols List offers a complete overview of all supported metal symbols, making it easier for developers to integrate the API into their applications.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, allowing developers to access the information they require efficiently. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Developers can access historical rates for most currencies dating back to 2019. By appending a specific date to the API call, users can retrieve past prices for gold and other metals.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates, allowing for in-depth analysis of price trends over time.
- Fluctuation Endpoint: This endpoint provides information about how metal prices fluctuate on a day-to-day basis, offering valuable insights into market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers interested in specific gold purities.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices of metals over a specified time period.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can obtain open, high, low, and close prices for metals, providing a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, allowing for extensive historical analysis.
- API Key: Each user receives a unique API key, which is essential for accessing the API and ensuring secure transactions.
- 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 offers a variety of endpoints, each designed to provide specific functionalities tailored to user needs.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to local market demands.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market trends and developments.
API Endpoint Examples and Responses
Understanding the API's response structure is crucial for effective integration. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1751511625,
"base": "USD",
"date": "2025-07-03",
"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 indicates a successful API call, providing the latest rates for various metals, including gold (XAU). The rates are expressed per troy ounce, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1751425225,
"base": "USD",
"date": "2025-07-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows historical rates for gold and other metals for a specific date. Developers can use this data to analyze price trends over time.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-06-26",
"end_date": "2025-07-03",
"base": "USD",
"rates": {
"2025-06-26": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-28": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint response provides daily rates for gold over a specified period, allowing for detailed analysis of price movements.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1751511625,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert an amount from USD to gold (XAU). The result indicates that 1000 USD is equivalent to 0.482 troy ounces of gold at the current rate.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-26",
"end_date": "2025-07-03",
"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 metal prices have changed over a specified period, including both absolute and percentage changes.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1751511625,
"base": "USD",
"date": "2025-07-03",
"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, which is essential for traders looking to analyze market performance.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1751511625,
"base": "USD",
"date": "2025-07-03",
"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 metals, which is crucial for traders looking to execute orders at the best possible prices.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for developers and traders interested in precious metals, particularly gold. By leveraging the various endpoints available, users can access real-time and historical data, analyze trends, and make informed trading decisions. The API's capabilities, including the latest rates, historical data, and conversion features, empower developers to create innovative applications that enhance the trading experience.
As the digital landscape continues to evolve, the integration of technology in precious metals trading will only become more pronounced. The Metals-API stands as a testament to this transformation, providing the necessary infrastructure for developers to build next-generation applications. For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance.
By utilizing the Metals-API, developers can unlock the full potential of precious metals data, paving the way for innovative solutions in the financial technology space.