Get Special Drawing Rights (XDR) Historical Prices using this API
Introduction
In the evolving landscape of global finance, Special Drawing Rights (XDR) have emerged as a pivotal instrument for enhancing liquidity and stability in the international monetary system. As a developer, accessing historical prices of XDR can be crucial for various applications, including financial analysis, market forecasting, and investment strategies. The Metals-API provides a robust solution for retrieving historical prices and real-time data for metals, including XDR. This blog post will delve into the capabilities of the Metals-API, exploring its features, endpoints, and practical applications for developers looking to harness the power of real-time metals data.
About Special Drawing Rights (XDR)
Special Drawing Rights (XDR) are an international reserve asset created by the International Monetary Fund (IMF) to supplement its member countries' official reserves. XDR is not a currency but rather a potential claim on the freely usable currencies of IMF member countries. The value of XDR is based on a basket of major currencies, including the US dollar, euro, Chinese yuan, Japanese yen, and British pound. As the world moves towards digital transformation, the integration of XDR into financial markets is becoming increasingly significant.
Technological innovation plays a crucial role in the way metals markets operate today. The advent of data analytics and smart technology integration allows for real-time insights into market trends, enabling developers to create applications that can predict price movements and analyze historical data effectively. The Metals-API stands at the forefront of this transformation, providing developers with the tools needed to access and manipulate metals data seamlessly.
API Description
The Metals-API is a powerful JSON API that offers real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API empowers developers to build next-generation applications by providing access to comprehensive data analytics and insights. With its user-friendly interface and extensive documentation, the Metals-API simplifies the process of integrating metals data into applications.
For developers looking to dive deeper into the API's capabilities, the Metals-API Documentation provides detailed information on how to utilize the API effectively. The documentation covers everything from authentication to endpoint usage, ensuring that developers have all the resources they need to implement the API successfully.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints that cater to different data retrieval needs. Here are some of the key features and their potential applications:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for metals. Depending on your subscription plan, this endpoint can return data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for applications that require up-to-the-minute pricing information, such as trading platforms or financial dashboards.
{
"success": true,
"timestamp": 1787357658,
"base": "USD",
"date": "2026-08-22",
"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
The Historical Rates Endpoint allows developers to access historical exchange rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve historical data for analysis and reporting purposes. This feature is particularly useful for financial analysts who need to evaluate trends over time.
{
"success": true,
"timestamp": 1787271258,
"base": "USD",
"date": "2026-08-21",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables developers to retrieve real-time bid and ask prices for metals. This information is crucial for traders who need to make informed decisions based on current market conditions. The bid price represents the maximum price that a buyer is willing to pay, while the ask price is the minimum price that a seller is willing to accept.
{
"success": true,
"timestamp": 1787357658,
"base": "USD",
"date": "2026-08-22",
"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"
}
Convert Endpoint
The Convert Endpoint allows developers to convert any amount from one metal to another or to/from USD. This feature is particularly useful for applications that require currency conversion capabilities, such as e-commerce platforms or financial calculators.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1787357658,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows developers to query the API for daily historical rates between two dates of their choice. This feature is invaluable for analyzing trends and fluctuations over specific time periods, enabling developers to create insightful reports and visualizations.
{
"success": true,
"timeseries": true,
"start_date": "2026-08-15",
"end_date": "2026-08-22",
"base": "USD",
"rates": {
"2026-08-15": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-17": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-22": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how currencies fluctuate on a day-to-day basis. This endpoint allows developers to track rate changes between two specified dates, offering insights into market volatility and trends.
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-15",
"end_date": "2026-08-22",
"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"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows developers to query the API for the open, high, low, and close prices for a specific time period. This data is essential for traders and analysts who need to evaluate market performance and make informed decisions based on historical price movements.
{
"success": true,
"timestamp": 1787357658,
"base": "USD",
"date": "2026-08-22",
"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"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for developers working with metals traded on the London Metal Exchange, allowing for comprehensive analysis of historical price data.
API Key and Authentication
Your API Key is a unique identifier that must be passed into the API base URL's access_key parameter to authenticate your requests. Proper management of your API key is crucial for maintaining security and ensuring that your application functions correctly.
API Response Structure
The Metals-API delivers exchange rates relative to USD by default. All data is returned in a structured JSON format, making it easy for developers to parse and utilize the information in their applications. Understanding the structure of the API response is essential for effective data handling.
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. This resource is invaluable for developers looking to integrate specific metal data into their applications.
Conclusion
In conclusion, the Metals-API offers a powerful and flexible solution for developers seeking to access historical prices and real-time data for Special Drawing Rights (XDR) and various metals. With its extensive range of endpoints, comprehensive documentation, and user-friendly interface, the Metals-API empowers developers to build innovative applications that leverage real-time metals data. By understanding the capabilities of the API and effectively utilizing its features, developers can create applications that provide valuable insights into market trends and fluctuations.
For further exploration of the API's capabilities, visit the Metals-API Website and dive into the Metals-API Documentation for detailed guidance on implementation and usage. Embrace the future of financial data integration and unlock the potential of metals data in your applications.