Fetch Surat Gold 18k (SURA-18k) Historical Prices for reporting with this API
Introduction
In the world of precious metals trading, accurate and timely data is paramount. For developers and analysts looking to fetch historical prices of Gold (XAU), the Metals-API offers a robust solution. This API provides a comprehensive suite of features that empower users to access real-time and historical data, enabling informed decision-making in the dynamic market of precious metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth and investment. Its significance transcends mere monetary value; it embodies a rich history intertwined with human civilization. As digital transformation sweeps across industries, the realm of precious metals is no exception. The integration of technology into trading practices has revolutionized how investors interact with Gold.
Data analytics plays a crucial role in understanding market trends and making predictions. With the right tools, traders can analyze historical price movements, identify patterns, and make data-driven decisions. The Metals-API facilitates this by providing access to historical prices, allowing users to delve deep into market insights.
Moreover, the API's innovative approach to price discovery leverages real-time data, ensuring that traders have the most current information at their fingertips. This is particularly important in a market where prices can fluctuate rapidly due to geopolitical events, economic indicators, and changes in supply and demand.
Digital Asset Solutions
As the financial landscape evolves, digital asset solutions are becoming increasingly relevant. The Metals-API not only provides historical data but also supports the conversion of metals into digital formats, enabling seamless transactions and integrations with various platforms. This capability is essential for developers looking to create next-generation applications that cater to the needs of modern investors.
API Description
The Metals-API is designed to provide developers with the tools necessary to access a wealth of information about precious metals. With its user-friendly interface and comprehensive documentation, the API allows for easy integration into existing systems. The API supports various endpoints, each tailored to specific functionalities, making it a versatile tool for developers.
One of the standout features of the Metals-API is its ability to deliver real-time data. Depending on your subscription plan, the API's latest rates endpoint can provide updates every 60 minutes, every 10 minutes, or even more frequently. This ensures that users have access to the most current market rates, which is crucial for making timely trading decisions.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for various metals, including Gold (XAU). Users can specify their subscription plan to determine the frequency of updates.
- Historical Rates Endpoint: Access historical rates dating back to 2019. By appending a specific date to the API request, users can retrieve past prices, which is invaluable for trend analysis.
- Bid and Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing strategies.
- Convert Endpoint: The conversion endpoint enables users to convert amounts between different metals or to/from USD, facilitating transactions across various currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two specified dates, allowing for in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how prices fluctuate on a day-to-day basis, helping traders understand volatility and market dynamics.
- Carat Endpoint: Users can retrieve Gold rates by carat, which is particularly useful for jewelers and those in the jewelry industry.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices within a specified timeframe, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access detailed OHLC data for specific dates, providing a comprehensive view of price movements.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering valuable insights for traders focused on industrial metals.
- API Key: Each user is assigned a unique API key, which is required for authentication and access to the API's features.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API includes 14 different endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market trends and developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various API endpoints, showcasing their functionality and the structure of their responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the latest rates endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1767658573,
"base": "USD",
"date": "2026-01-06",
"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"
}
This response indicates the success of the request, the timestamp of the data, the base currency (USD), the date of the rates, and the rates for various metals.
Historical Rates Endpoint
Accessing historical exchange rates is straightforward. Here’s an example response for a specific date:
{
"success": true,
"timestamp": 1767572173,
"base": "USD",
"date": "2026-01-05",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for Gold and other metals, allowing users to analyze past performance.
Time-Series Endpoint
The time-series endpoint allows users to retrieve exchange rates for a specific period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2025-12-30",
"end_date": "2026-01-06",
"base": "USD",
"rates": {
"2025-12-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-01": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-06": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates between the specified start and end dates, enabling users to analyze trends over time.
Convert Endpoint
The convert endpoint is useful for converting amounts between different metals or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1767658573,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to Gold (XAU), providing both the rate and the result in troy ounces.
Fluctuation Endpoint
Tracking rate fluctuations is essential for understanding market volatility. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-30",
"end_date": "2026-01-06",
"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"
}
This response provides detailed information about how prices have changed over the specified period, including both absolute and percentage changes.
OHLC (Open/High/Low/Close) Price Endpoint
For a comprehensive view of price movements, the OHLC endpoint is invaluable. Here’s an example response:
{
"success": true,
"timestamp": 1767658573,
"base": "USD",
"date": "2026-01-06",
"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"
}
This response provides the opening, highest, lowest, and closing prices for Gold and other metals, which is crucial for traders looking to analyze market performance.
Bid/Ask Endpoint
Understanding the current bid and ask prices is essential for making informed trading decisions. Here’s an example response:
{
"success": true,
"timestamp": 1767658573,
"base": "USD",
"date": "2026-01-06",
"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"
}
This response provides the bid and ask prices for Gold and other metals, along with the spread, which is crucial for traders looking to optimize their entry and exit points.
Conclusion
The Metals-API is a powerful tool for developers and analysts seeking to access historical prices and real-time data for precious metals like Gold (XAU). With its comprehensive suite of endpoints, the API enables users to perform in-depth analysis, track market fluctuations, and make informed trading decisions.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that integrate real-time data, enhancing the trading experience for users. Whether you are looking to analyze historical trends, convert currencies, or track price fluctuations, the Metals-API provides the necessary tools to succeed in the competitive world of precious metals trading.
For more information, explore the Metals-API Documentation and discover the full range of features available. Additionally, check out the Metals-API Supported Symbols to understand the various metals you can access through the API. Embrace the future of precious metals trading with the Metals-API and unlock the potential of real-time data.