Get Surat Gold 22k (SURA-22k) Historical Prices for your projects using this API
Introduction
In the world of finance and investment, gold (XAU) has always held a significant place due to its intrinsic value and historical importance. For developers and analysts looking to harness the power of gold data for their projects, accessing historical prices is crucial. The Metals-API provides a robust solution for retrieving historical prices of gold and other precious metals, enabling developers to create innovative applications that leverage real-time and historical data. This blog post will delve into the capabilities of the Metals-API, focusing on how to obtain historical prices for 22k gold (SURA-22k) and explore the transformative potential of integrating such data into various applications.
About Gold (XAU)
Gold has been a symbol of wealth and a standard for currency for centuries. In recent years, the digital transformation in precious metals has opened new avenues for data analytics and market insights. The integration of technology in trading has revolutionized how investors access and interpret market data. Innovations in price discovery and the emergence of digital asset solutions have made it easier than ever to track gold prices in real-time.
With the rise of APIs, developers can now access comprehensive data sets that provide insights into market trends, historical prices, and fluctuations. The Metals-API stands out as a leading solution for obtaining accurate and timely gold price data, empowering developers to build next-generation applications that cater to the needs of investors and analysts alike.
Metals-API Overview
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical data for various metals, including gold (XAU). This API enables users to retrieve exchange rates, historical prices, and other valuable information that can be utilized in financial applications, trading platforms, and market analysis tools. The API's capabilities extend beyond simple data retrieval; it offers a range of endpoints that cater to different needs, ensuring that developers can find the right solution for their specific use cases.
For more detailed information about the API's features and capabilities, visit the Metals-API Documentation.
Key Features of Metals-API
The Metals-API offers a variety of endpoints that provide different functionalities, making it a versatile tool for developers. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint allows users to retrieve real-time exchange rate data for various metals, including gold. Depending on the subscription plan, this endpoint can return data updated every 60 minutes or even every 10 minutes. This feature is essential for applications that require up-to-the-minute pricing information.
{
"success": true,
"timestamp": 1784333602,
"base": "USD",
"date": "2026-07-18",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
For developers needing historical data, the Historical Rates Endpoint is invaluable. This endpoint allows users to access historical rates for most currencies dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the Metals-API for historical rates, making it easy to analyze trends over time.
{
"success": true,
"timestamp": 1784247202,
"base": "USD",
"date": "2026-07-17",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Bid and Ask Endpoint
The Bid and Ask Endpoint provides real-time bid and ask prices for metals, which is crucial for traders looking to make informed decisions. This feature allows users to retrieve the current bid and ask prices, enabling them to assess market conditions effectively.
{
"success": true,
"timestamp": 1784333602,
"base": "USD",
"date": "2026-07-18",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for applications that require currency conversion for trading or investment purposes.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1784333602,
"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 essential for analyzing price trends over specific periods, enabling users to make data-driven decisions.
{
"success": true,
"timeseries": true,
"start_date": "2026-07-11",
"end_date": "2026-07-18",
"base": "USD",
"rates": {
"2026-07-11": {
"XAU": 0.000485
},
"2026-07-18": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how currencies fluctuate on a day-to-day basis. This feature is useful for tracking market volatility and understanding price movements over time.
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-11",
"end_date": "2026-07-18",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows users to query the API for the open, high, low, and close prices for a specific time period. This data is critical for traders who rely on historical price patterns to inform their strategies.
{
"success": true,
"timestamp": 1784333602,
"base": "USD",
"date": "2026-07-18",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint allows users to query the API to get the lowest and highest price for a specified date. This feature is particularly useful for identifying price extremes and making informed trading decisions.
{
"success": true,
"timestamp": 1784333602,
"base": "USD",
"date": "2026-07-18",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"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 useful for developers needing long-term data for analysis and reporting.
{
"success": true,
"timestamp": 1784247202,
"base": "USD",
"date": "2026-07-17",
"rates": {
"XAU": 0.000485
},
"unit": "per troy ounce"
}
API Key and Authentication
To access the Metals-API, developers must use an API key, which is a unique identifier passed into the API base URL's access_key parameter. This key is essential for authentication and ensures that only authorized users can access the data.
API Response Structure
The API responses are structured in a JSON format, providing a clear and organized way to access the data. Each response includes fields such as success, timestamp, base currency, date, rates, and unit. Understanding these fields is crucial for developers to effectively utilize the API.
Practical Use Cases and Integration Strategies
Integrating the Metals-API into applications can unlock numerous possibilities for developers. Here are some practical use cases:
Investment Analysis Tools
Developers can create investment analysis tools that leverage historical gold prices to help users make informed decisions. By utilizing the Historical Rates Endpoint, applications can provide users with insights into price trends and fluctuations over time.
Trading Platforms
For trading platforms, real-time data is essential. The Latest Rates Endpoint can be integrated to provide users with up-to-the-minute pricing information, allowing them to execute trades based on current market conditions.
Market Research Applications
Market researchers can utilize the Time-Series Endpoint to analyze price movements over specific periods, helping them identify patterns and trends that can inform investment strategies.
Conclusion
The Metals-API offers a comprehensive solution for developers seeking to access historical prices and real-time data for gold and other precious metals. By leveraging the various endpoints, developers can create innovative applications that cater to the needs of investors and analysts. Whether it's for investment analysis, trading platforms, or market research, the Metals-API provides the necessary tools to harness the power of gold data effectively.
For more information on the capabilities of the Metals-API, visit the Metals-API Website and explore the Metals-API Supported Symbols for a complete list of available metals and their specifications. By integrating this powerful API into your projects, you can unlock the potential of gold data and drive innovation in the financial technology space.