Integrate this API to get Dehradun Gold 22k (DEHR-22k) prices
Integrate this API to get Dehradun Gold 22k (DEHR-22k) prices
In today's fast-paced financial landscape, the demand for real-time data on precious metals, particularly gold, has surged. The ability to access accurate and timely information about Gold (XAU) prices is crucial for traders, investors, and developers alike. This blog post delves into the transformative potential of the Metals-API, which provides comprehensive data on gold prices, including the specific rates for Dehradun Gold 22k (DEHR-22k). We will explore the API's capabilities, its innovative features, and how it can empower developers to create next-generation applications in the precious metals market.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and currency fluctuations. In the digital age, the integration of technology into the precious metals market has revolutionized how investors and traders access and analyze gold prices. The Metals-API allows users to harness data analytics and market insights, enabling them to make informed decisions based on real-time information.
With the rise of digital asset solutions, the demand for accurate gold pricing has never been higher. The Metals-API provides a seamless way to integrate gold price data into applications, facilitating innovation in price discovery and trading strategies. By leveraging this API, developers can create tools that not only track gold prices but also analyze market trends and fluctuations, providing users with a competitive edge.
API Description
The Metals-API is a powerful tool designed for developers seeking to access real-time and historical data on precious metals. It offers a range of endpoints that cater to various needs, from retrieving the latest gold prices to analyzing historical trends. The API's capabilities extend beyond simple price retrieval; it empowers developers to build applications that can perform complex analyses and provide valuable insights into the precious metals market.
For more detailed information on how to utilize the API, refer to the Metals-API Documentation, which outlines the various endpoints and their functionalities.
Key Features and Endpoints
The Metals-API boasts a variety of features that enhance its usability and functionality. Below, we explore some of the key endpoints and their potential applications:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for gold and other metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This feature is essential for traders who need to stay informed about the latest market movements.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019 by appending a specific date to the API request. This feature is invaluable for conducting trend analyses and understanding past market behaviors.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for gold and other metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion feature that enables users to convert amounts between different metals or to/from USD, facilitating seamless transactions and calculations.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates, making it easier to analyze price movements over time.
- Fluctuation Endpoint: Users can track how gold prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, which is particularly useful for jewelers and consumers interested in specific gold qualities.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for gold over a specified period, aiding in investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides detailed OHLC data for gold prices, allowing traders to analyze market performance comprehensively.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, offering insights into long-term market trends.
- API Key: Each user receives a unique API key, which must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency and ease of understanding for users.
- Available Endpoints: The Metals-API features 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metals, ensuring users have access to the latest data.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols. 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 API responses is crucial for developers. Below are examples of JSON responses for various endpoints, illustrating their structure and the information they provide.
Latest Rates Endpoint
{
"success": true,
"timestamp": 1781136603,
"base": "USD",
"date": "2026-06-11",
"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 response indicates a successful request, providing the timestamp, base currency (USD), date of the rates, and the current rates for various metals, including gold (XAU).
Historical Rates Endpoint
{
"success": true,
"timestamp": 1781050203,
"base": "USD",
"date": "2026-06-10",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specified date, allowing users to analyze past market conditions.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-06-04",
"end_date": "2026-06-11",
"base": "USD",
"rates": {
"2026-06-04": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-06": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-11": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response shows the rates for gold over a specified time period, enabling users to track price changes and trends.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1781136603,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The convert endpoint allows users to see how much a specific amount in USD converts to in gold (XAU), providing practical insights for transactions.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-04",
"end_date": "2026-06-11",
"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 endpoint provides insights into how gold prices fluctuate over a specified period, essential for understanding market volatility.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1781136603,
"base": "USD",
"date": "2026-06-11",
"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"
}
The OHLC endpoint provides a comprehensive view of market performance for gold, allowing traders to analyze price movements effectively.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1781136603,
"base": "USD",
"date": "2026-06-11",
"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 endpoint provides current bid and ask prices for gold, essential for traders looking to make informed decisions based on market liquidity.
Conclusion
The Metals-API is an invaluable resource for developers and traders seeking to access real-time and historical data on gold prices, including specific rates for Dehradun Gold 22k (DEHR-22k). By integrating this API into applications, users can leverage advanced data analytics, market insights, and innovative trading strategies. The comprehensive features offered by the Metals-API, including various endpoints for retrieving latest rates, historical data, and price fluctuations, empower developers to create robust applications that meet the demands of the modern financial landscape.
For further exploration of the API's capabilities, visit the Metals-API Website and check out the Metals-API Documentation for detailed guidance on implementation. Additionally, refer to the Metals-API Supported Symbols page to understand the range of metals available for analysis. By utilizing the Metals-API, developers can stay ahead in the dynamic world of precious metals trading.