Access DB Gold Short ETN (DGZ) pricing data using this API

Access DB Gold Short ETN (DGZ) Pricing Data Using This API
Metals-API provides a robust solution for accessing comprehensive pricing data for various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). This blog post will delve into the capabilities of the Metals-API, focusing on how it empowers users to harness the power of data analytics and technology integration in trading precious metals.
About Gold (XAU)
API Description
Metals-API is designed to provide developers with access to real-time and historical pricing data for various metals. This API is a powerful tool that enables the creation of applications capable of delivering insights and analytics that were previously difficult to obtain. With its focus on innovation and technological advancement, the Metals-API empowers users to build applications that can transform the way precious metals are traded and analyzed.
Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, users can receive updates every 60 minutes or even every 10 minutes. This feature is essential for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Access to historical rates dating back to 2019 allows users to analyze trends and make informed predictions. By appending a specific date to the API request, developers can retrieve historical data that is crucial for backtesting trading strategies.
- Bid and Ask Endpoint: This feature provides real-time bid and ask prices, which are vital for traders looking to execute orders at the best possible prices. Understanding the spread between these prices can help traders optimize their entry and exit points.
- Convert Endpoint: The conversion feature allows users to convert amounts between different metals or to/from USD. This is particularly useful for traders who operate in multiple currencies or need to assess the value of their holdings in different terms.
- Time-Series Endpoint: Users can query the API for daily historical rates between two specified dates. This endpoint is beneficial for analyzing price movements over time and understanding market trends.
- Fluctuation Endpoint: This endpoint tracks how metal prices fluctuate between two dates, providing insights into market volatility. Traders can use this information to gauge risk and adjust their strategies accordingly.
- Carat Endpoint: For those dealing with gold jewelry, the carat endpoint provides information about gold rates based on carat weight. This feature is essential for jewelers and consumers alike.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for a specified date range. This information is crucial for identifying market extremes and making strategic decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for a specific date, allowing traders to analyze daily price movements and make informed trading decisions.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for users interested in the London Metal Exchange prices.
- API Key: Each user is assigned a unique API key, which is required for authentication when making requests to the API. This ensures secure access to the data.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API provides a comprehensive list of endpoints, each designed to deliver specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns all available metal symbols, allowing users to easily identify which metals they can query.
- Gold Price India Endpoint: For users interested in the Indian market, this endpoint provides the latest gold prices in India, catering to local traders and investors.
- News Endpoint: Stay updated with the latest news articles related to various metals through this endpoint, which can help users stay informed about market trends and events.
List of Symbols
Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1753466414,
"base": "USD",
"date": "2025-07-25",
"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
{
"success": true,
"timestamp": 1753380014,
"base": "USD",
"date": "2025-07-24",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-07-18",
"end_date": "2025-07-25",
"base": "USD",
"rates": {
"2025-07-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-07-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-25": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1753466414,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-07-18",
"end_date": "2025-07-25",
"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
{
"success": true,
"timestamp": 1753466414,
"base": "USD",
"date": "2025-07-25",
"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
{
"success": true,
"timestamp": 1753466414,
"base": "USD",
"date": "2025-07-25",
"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
Metals-API is a powerful tool for developers and traders seeking to access real-time and historical pricing data for precious metals. With its extensive range of endpoints and features, the API enables users to build innovative applications that leverage data analytics and market insights. By integrating the Metals-API into trading platforms, developers can provide users with the tools they need to make informed decisions in a rapidly changing market.
Metals-API Documentation offers comprehensive guidance on implementation and usage. Additionally, the Metals-API Supported Symbols page provides a complete list of available metal symbols, ensuring that users can access the data they need.