Get Digix Gold (DGX) prices using this API
Get Digix Gold (DGX) Prices Using This API
In the rapidly evolving landscape of digital assets, the integration of traditional commodities like gold into the digital realm has gained significant traction. Digix Gold (DGX) represents a pioneering step in this direction, allowing users to hold gold in a digital format. To effectively track and analyze the price of DGX, developers can leverage the Metals-API, a powerful tool that provides real-time and historical data on precious metals, including gold. This blog post will explore the capabilities of the Metals-API, focusing on its innovative features, endpoints, and how it empowers developers to create next-generation applications.
Metals-API Information
About Gold (XAU)
Gold has long been regarded as a safe-haven asset, a hedge against inflation, and a store of value. With the rise of digital transformation in the precious metals market, the demand for accurate and timely data has never been higher. The Metals-API provides developers with the tools to access real-time market insights, enabling them to integrate gold pricing into their applications seamlessly. By utilizing data analytics and technology integration, developers can innovate in price discovery and offer digital asset solutions that cater to the needs of modern investors.
API Description
The Metals-API is designed to provide developers with comprehensive access to real-time and historical data for various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). This API empowers developers to build applications that require accurate pricing information, whether for trading platforms, financial analysis tools, or investment applications. With its robust architecture, the Metals-API supports a wide range of functionalities, making it an essential resource for anyone looking to integrate precious metals data into their projects.
For more detailed information, developers can refer to the Metals-API Documentation, which outlines the various endpoints and their capabilities.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to cater to specific needs within the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for precious metals, updated based on the user's subscription plan. Developers can access the latest prices for gold and other metals, allowing for immediate integration into trading applications.
- Historical Rates Endpoint: Developers can retrieve historical rates for most currencies dating back to 2019. By appending a specific date to the endpoint, users can analyze past trends and make informed decisions based on historical data.
- Bid And Ask Endpoint: This feature enables users to obtain real-time bid and ask prices for metals, providing critical information for traders looking to execute buy or sell orders.
- Convert Endpoint: The conversion endpoint allows users to convert any amount from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice, enabling in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides insights into how metal prices fluctuate on a day-to-day basis, allowing developers to track market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers interested in the purity of gold.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest prices for a specified date, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access open, high, low, and close prices for a specific time period, which is essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD, ensuring consistency and reliability in the data provided.
- Available Endpoints: The API features 14 endpoints, each offering distinct functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
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": 1779754412,
"base": "USD",
"date": "2026-05-26",
"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": 1779668012,
"base": "USD",
"date": "2026-05-25",
"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": "2026-05-19",
"end_date": "2026-05-26",
"base": "USD",
"rates": {
"2026-05-19": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-05-21": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-05-26": {
"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": 1779754412,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-19",
"end_date": "2026-05-26",
"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": 1779754412,
"base": "USD",
"date": "2026-05-26",
"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": 1779754412,
"base": "USD",
"date": "2026-05-26",
"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
The Metals-API is an invaluable resource for developers looking to integrate precious metals data into their applications, particularly for tracking Digix Gold (DGX) prices. With its extensive range of endpoints, real-time data capabilities, and historical insights, the API empowers developers to create innovative solutions that meet the demands of modern investors. By leveraging the power of the Metals-API, developers can enhance their applications with accurate pricing information, enabling users to make informed decisions in the dynamic world of digital assets.
For further exploration of the API's capabilities, developers are encouraged to visit the Metals-API Documentation and familiarize themselves with the various endpoints and their functionalities. Additionally, the Metals-API Supported Symbols page provides a comprehensive list of available symbols, ensuring users have access to the latest information. By harnessing the potential of the Metals-API, developers can stay ahead in the competitive landscape of digital asset solutions.