Fetch Surat Gold (XAU-SURA) prices in real-time with this API
Introduction
In the ever-evolving landscape of financial markets, the demand for real-time data has never been more critical, especially in the realm of precious metals like Gold (XAU). The ability to fetch Gold prices in real-time can empower traders, investors, and developers alike, enabling them to make informed decisions based on the latest market insights. This blog post delves into the transformative capabilities of the Metals-API, a powerful tool designed to provide real-time and historical data for precious metals, including Gold.
About Gold (XAU)
Gold has long been regarded as a safe haven asset, a hedge against inflation, and a store of value. Its significance in the financial markets is underscored by its digital transformation, where technology integration in trading has revolutionized how investors access and analyze market data. The rise of data analytics has enabled market participants to gain deeper insights into price movements, trends, and volatility, fostering innovation in price discovery.
As digital asset solutions gain traction, the demand for real-time data on Gold prices has surged. The Metals-API stands at the forefront of this transformation, offering developers the tools they need to build next-generation applications that leverage real-time metals data.
API Description
The Metals-API is a comprehensive JSON API that provides access to real-time and historical data for various metals, including Gold, Silver, Platinum, and Palladium. With its innovative architecture, the API empowers developers to create applications that can fetch the latest market rates, historical trends, and even perform currency conversions seamlessly.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated at intervals depending on the user's subscription plan. This capability is crucial for traders who rely on up-to-the-minute information to make quick decisions in volatile markets. The API also supports a wide range of endpoints, each designed to cater to specific data needs, from historical rates to bid and ask prices.
Key Features and Endpoints
The Metals-API offers a plethora of features that cater to various use cases. Below are some of the key endpoints and their functionalities:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for all available 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 to stay ahead of market fluctuations.
{
"success": true,
"timestamp": 1786839005,
"base": "USD",
"date": "2026-08-16",
"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
Accessing historical rates is crucial for analyzing trends and making informed predictions. The Historical Rates Endpoint allows users to retrieve data dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the API for past rates, enabling them to conduct thorough market analyses.
{
"success": true,
"timestamp": 1786752605,
"base": "USD",
"date": "2026-08-15",
"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 provides real-time bid and ask prices for various metals. This information is vital for traders looking to execute orders at the best possible prices. Depending on your subscription plan, this endpoint can deliver timely data that reflects current market conditions.
{
"success": true,
"timestamp": 1786839005,
"base": "USD",
"date": "2026-08-16",
"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 users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders who need to assess the value of their holdings in different currencies or metals.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1786839005,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for conducting trend analysis and understanding price movements over time.
{
"success": true,
"timeseries": true,
"start_date": "2026-08-09",
"end_date": "2026-08-16",
"base": "USD",
"rates": {
"2026-08-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-16": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides insights into how currencies fluctuate on a day-to-day basis. By tracking rate changes between two dates, traders can better understand market volatility and make informed decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-09",
"end_date": "2026-08-16",
"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 Endpoint provides essential data for traders looking to analyze price movements over a specific time period. By retrieving the open, high, low, and close prices, users can gain insights into market trends and make strategic decisions.
{
"success": true,
"timestamp": 1786839005,
"base": "USD",
"date": "2026-08-16",
"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 users interested in the London Metal Exchange (LME) data.
API Key and Response
To access the Metals-API, users must obtain an API Key, which is passed into the API base URL's access_key parameter. This key ensures secure access to the API's features and data. The exchange rates delivered by the Metals-API are by default relative to USD, and all data is returned in standardized formats, making integration straightforward for developers.
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
The Metals-API is a powerful tool that enables developers to access real-time and historical data for precious metals like Gold. With its extensive range of endpoints, the API provides the necessary tools for building applications that can analyze market trends, track price fluctuations, and perform currency conversions. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance trading strategies and improve decision-making processes.
For those looking to dive deeper into the functionalities of the Metals-API, the Metals-API Documentation offers comprehensive guidance on implementation and usage. As the financial landscape continues to evolve, having access to real-time data will be paramount for success in trading precious metals.