Integrate Dehradun Gold 22k (DEHR-22k) Historical Prices into your application using this API
Integrate Dehradun Gold 22k (DEHR-22k) Historical Prices into Your Application Using This API
In the ever-evolving landscape of financial technology, integrating real-time data into applications has become a necessity for developers. One of the most sought-after data types is the historical prices of precious metals, particularly gold. This blog post will delve into the integration of Dehradun Gold 22k (DEHR-22k) historical prices into your application using the Metals-API. We will explore the capabilities of the API, the significance of gold in the digital economy, and how you can leverage this powerful tool to enhance your applications.
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. In recent years, the digital transformation in precious metals has opened new avenues for data analytics and market insights. With the rise of technology integration in trading, developers are now empowered to innovate in price discovery and create digital asset solutions that cater to a global audience.
The significance of gold extends beyond its physical properties; it is a hedge against inflation, a safe haven during economic uncertainty, and a vital component in various industries, including jewelry, electronics, and finance. As the demand for accurate and timely data increases, the Metals-API stands out as a robust solution for accessing historical gold prices and other precious metals.
API Description
The Metals-API is a powerful tool designed for developers seeking to integrate real-time and historical metals data into their applications. This API provides a comprehensive suite of endpoints that allow users to access a wealth of information, including the latest rates, historical prices, and conversion capabilities. The transformative potential of real-time metals data enables developers to build next-generation applications that can adapt to market changes swiftly.
With the Metals-API, you can access various endpoints that cater to different needs. For instance, the Latest Rates Endpoint provides real-time exchange rate data, updated every 60 minutes, every 10 minutes, or even more frequently, depending on your subscription plan. This feature is crucial for applications that require up-to-the-minute pricing information.
The Historical Rates Endpoint allows you to query historical prices dating back to 2019 by appending a specific date to your request. This is particularly useful for developers looking to analyze trends over time or to provide users with historical context for current prices.
Another valuable feature is the Bid and Ask Endpoint, which retrieves real-time bid and ask prices for various metals. This information is essential for traders who need to make informed decisions based on market conditions.
The Convert Endpoint enables you to convert any amount from one metal to another or to/from USD, making it easier for users to understand the value of their assets in different contexts. Additionally, the Time-Series Endpoint allows you to query daily historical rates between two dates, providing a comprehensive view of price movements over time.
For those interested in tracking fluctuations, the Fluctuation Endpoint provides insights into how prices change on a day-to-day basis. This feature is particularly useful for identifying trends and making predictions based on historical data.
Moreover, the Carat Endpoint allows you to retrieve information about gold rates by carat, catering to users interested in specific gold purity levels. The Lowest/Highest Price Endpoint enables you to query the API for the lowest and highest prices within a specified timeframe, while the Open/High/Low/Close (OHLC) Price Endpoint provides detailed price data for specific periods.
For developers interested in LME symbols, the Historical LME Endpoint offers access to historical rates dating back to 2008, allowing for a deeper analysis of market trends. The API also includes a News Endpoint that retrieves the latest news articles related to various metals, keeping users informed about market developments.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to provide specific functionalities:
- Latest Rates Endpoint: Access real-time exchange rates for all available metals.
- Historical Rates Endpoint: Retrieve historical exchange rates for any date since 2019.
- Bid and Ask Endpoint: Get current bid and ask prices for metals.
- Convert Endpoint: Convert any amount from one metal to another or to/from USD.
- Time-Series Endpoint: Query exchange rates for a specific time period.
- Fluctuation Endpoint: Track rate fluctuations between two dates.
- Carat Endpoint: Retrieve information about gold rates by carat.
- Lowest/Highest Price Endpoint: Get the lowest and highest price for a specified date.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period.
- Historical LME Endpoint: Access historical rates for LME symbols.
- News Endpoint: Retrieve the latest news articles related to various metals.
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 effective integration. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1768695661,
"base": "USD",
"date": "2026-01-18",
"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 that the API successfully retrieved the latest rates for various metals, with gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1768609261,
"base": "USD",
"date": "2026-01-17",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows a successful retrieval of historical rates for a specific date, allowing developers to analyze past pricing trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-11",
"end_date": "2026-01-18",
"base": "USD",
"rates": {
"2026-01-11": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-13": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-18": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of rates for gold, silver, and platinum over a specified period, enabling developers to visualize trends and fluctuations.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1768695661,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example illustrates how to convert an amount from USD to gold (XAU), providing the conversion rate and the resulting amount in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-11",
"end_date": "2026-01-18",
"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 the prices of gold, silver, and platinum fluctuated over a specified period, which is essential for traders and analysts.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1768695661,
"base": "USD",
"date": "2026-01-18",
"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 endpoint provides critical price data for gold, silver, and platinum, allowing developers to analyze market performance over a specific timeframe.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1768695661,
"base": "USD",
"date": "2026-01-18",
"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 for various metals, which is essential for traders looking to make informed decisions.
Conclusion
Integrating Dehradun Gold 22k (DEHR-22k) historical prices into your application using the Metals-API is a strategic move for developers aiming to provide accurate and timely data to their users. The API's extensive capabilities, including real-time rates, historical data, and conversion functionalities, empower developers to create innovative applications that can adapt to the dynamic nature of the metals market.
By leveraging the Metals-API, you can enhance your application's functionality, provide valuable insights to users, and stay ahead in the competitive landscape of financial technology. For more detailed information, refer to the Metals-API Documentation and explore the various endpoints available to you.
As the demand for precious metals continues to grow, the ability to access and analyze historical prices will become increasingly important. Embrace the power of the Metals-API and unlock the potential of your applications today.