Access DB Gold Double Long ETN (DGP) Historical Prices via this API

Access DB Gold Double Long ETN (DGP) Historical Prices via this API
The world of precious metals trading has undergone a significant transformation in recent years, driven by technological advancements and the increasing demand for real-time data. One of the most notable developments in this space is the emergence of APIs that provide access to historical prices and market insights. The Metals-API stands out as a powerful tool for developers looking to integrate gold price data into their applications. In this blog post, we will explore how to access historical prices for the Gold Double Long ETN (DGP) using the Metals-API, along with a comprehensive overview of its features and capabilities.
Metals-API Information
The Metals-API is a robust platform that offers real-time and historical data for various precious metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). With its user-friendly interface and extensive documentation, developers can easily access the data they need to build innovative applications. The API provides a range of endpoints that cater to different use cases, from retrieving the latest rates to accessing historical data dating back to 2019.
About Gold (XAU)
Gold has long been considered a safe haven asset and a store of value. In recent years, the digital transformation in precious metals trading has opened new avenues for investors and traders alike. The integration of data analytics and market insights has enabled more informed decision-making, while technology has streamlined trading processes. The innovation in price discovery mechanisms has also enhanced transparency in the market, allowing for more accurate valuations.
As the demand for digital asset solutions grows, the importance of real-time metals data cannot be overstated. The Metals-API empowers developers to create next-generation applications that leverage this data for various purposes, including investment analysis, risk management, and market forecasting. By utilizing the Metals-API, developers can tap into a wealth of information that can drive their applications and provide users with valuable insights.
API Description
The Metals-API is designed to provide developers with the tools they need to access and utilize metals data effectively. With a focus on innovation and technological advancement, the API offers a range of features that can transform how users interact with precious metals data. The API supports various endpoints, each tailored to specific functionalities, making it easy for developers to find the information they need.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on using the API.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for precious metals. Depending on your subscription plan, the API can return updates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve historical price data for gold and other metals, allowing for in-depth analysis and trend identification.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for metals. Understanding the bid-ask spread is crucial for traders looking to execute orders at optimal prices.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for investors dealing in multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice. This feature is invaluable for analyzing price movements over specific periods.
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat. This feature is essential for jewelers and consumers looking to understand the value of gold in different purities.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date range, allowing users to identify price extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a constantly updated list of available endpoints, ensuring developers have access to the latest features.
- Supported Symbols Endpoint: This endpoint returns all available currencies, making it easy for developers to find the symbols they need.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for investors in the Indian market.
- News Endpoint: Stay updated with 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. For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1749693675,
"base": "USD",
"date": "2025-06-12",
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1749607275,
"base": "USD",
"date": "2025-06-11",
"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": "2025-06-05",
"end_date": "2025-06-12",
"base": "USD",
"rates": {
"2025-06-05": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-07": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-12": {
"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": 1749693675,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-05",
"end_date": "2025-06-12",
"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": 1749693675,
"base": "USD",
"date": "2025-06-12",
"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": 1749693675,
"base": "USD",
"date": "2025-06-12",
"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
In conclusion, the Metals-API provides a comprehensive and powerful solution for accessing historical prices and real-time data for precious metals like gold. By leveraging the various endpoints offered by the API, developers can create innovative applications that enhance trading strategies, investment analysis, and market insights. The ability to access historical data, real-time rates, and fluctuations empowers users to make informed decisions in a rapidly changing market.
For developers looking to integrate precious metals data into their applications, the Metals-API is an invaluable resource. With its extensive documentation and user-friendly interface, accessing and utilizing metals data has never been easier. Explore the potential of the Metals-API today by visiting the Metals-API Website and check out the Metals-API Documentation for detailed guidance on implementation.