Get Surat Gold 18k (SURA-18k) Historical Prices with Technical Indicators using this API
Introduction
In the world of finance, gold (XAU) has always held a significant place as a store of value and a hedge against inflation. With the advent of technology, accessing historical prices and market insights has become easier than ever. The Metals-API provides developers with the tools necessary to retrieve real-time and historical data on gold and other precious metals. This blog post will explore how to obtain historical prices for 18k gold (SURA-18k) using the Metals-API, while also delving into the technical indicators that can enhance trading strategies.
Understanding Gold (XAU)
Gold has been a symbol of wealth and prosperity for centuries. Its unique properties make it a desirable asset for investors and traders alike. As digital transformation continues to reshape the financial landscape, the integration of data analytics and technology in trading has become paramount. The Metals-API stands at the forefront of this transformation, offering a robust platform for accessing real-time metals data.
Digital Transformation in Precious Metals
The digital transformation in the precious metals market has led to innovative solutions for price discovery and trading. By leveraging APIs like Metals-API, developers can create applications that provide real-time insights into market trends, enabling traders to make informed decisions. The integration of advanced data analytics allows for a deeper understanding of market dynamics, which is essential for successful trading.
Data Analytics and Market Insights
Data analytics plays a crucial role in understanding market behavior. The Metals-API offers various endpoints that allow developers to access historical rates, bid and ask prices, and fluctuations over time. By analyzing this data, traders can identify patterns and trends that may influence their trading strategies. For instance, the Historical Rates Endpoint enables users to retrieve historical prices for gold dating back to 2019, providing a comprehensive view of price movements.
Technology Integration in Trading
Integrating technology into trading processes enhances efficiency and accuracy. The Metals-API provides a suite of endpoints that facilitate seamless integration into trading platforms. For example, the Convert Endpoint allows users to convert amounts between different metals or currencies, streamlining the trading process. This capability is particularly useful for traders who operate in multiple markets and require quick conversions to optimize their trades.
API Description
The Metals-API is a powerful tool that empowers developers to build next-generation applications focused on precious metals trading. With its real-time data capabilities, the API allows for the retrieval of various data points, including current prices, historical rates, and fluctuations. The API is designed to be user-friendly, with comprehensive documentation available at the Metals-API Documentation.
Key Features of Metals-API
The Metals-API offers a range of features that cater to the needs of developers and traders:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or every 10 minutes.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. This endpoint allows users to query historical data by appending a specific date.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for metals, which is essential for traders looking to make informed decisions based on current market conditions.
- Convert Endpoint: Convert any amount from one metal to another or to/from USD, facilitating smooth transactions across different markets.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, allowing for in-depth analysis of price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and traders dealing in gold jewelry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specific date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Get detailed OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates are delivered relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 endpoints, each providing different functionalities tailored to various trading needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
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 metals into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
The Latest Rates Endpoint allows you to get real-time exchange rates for all available metals. Here’s an example response:
{
"success": true,
"timestamp": 1781914635,
"base": "USD",
"date": "2026-06-20",
"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"
}
In this response, the rates object contains the current exchange rates for various metals, with gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999 using the Historical Rates Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1781828235,
"base": "USD",
"date": "2026-06-19",
"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 traders to analyze past performance and make informed decisions.
Time-Series Endpoint
The Time-Series Endpoint enables users to get exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-06-13",
"end_date": "2026-06-20",
"base": "USD",
"rates": {
"2026-06-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint is particularly useful for traders looking to analyze trends over a specified period, allowing for better forecasting and strategy development.
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1781914635,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how much gold can be obtained for a specified amount of USD, providing traders with essential information for making conversion decisions.
Fluctuation Endpoint
The Fluctuation Endpoint tracks rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-13",
"end_date": "2026-06-20",
"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 endpoint provides insights into how prices have changed over a specific period, allowing traders to assess market volatility and make informed decisions.
OHLC (Open/High/Low/Close) Price Endpoint
The OHLC Price Endpoint provides open, high, low, and close prices for a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1781914635,
"base": "USD",
"date": "2026-06-20",
"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 data is crucial for traders who rely on technical analysis to inform their trading strategies, as it provides a comprehensive view of price movements within a specified timeframe.
Bid/Ask Endpoint
The Bid/Ask Endpoint provides current bid and ask prices for metals. Here’s an example response:
{
"success": true,
"timestamp": 1781914635,
"base": "USD",
"date": "2026-06-20",
"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 endpoint is essential for traders who need to know the current market prices to execute trades effectively.
Conclusion
In conclusion, the Metals-API provides a comprehensive suite of tools for developers and traders looking to access historical prices and real-time data for gold and other precious metals. By leveraging the various endpoints available, users can gain valuable insights into market trends, make informed trading decisions, and optimize their strategies. The integration of technology and data analytics into precious metals trading is transforming the landscape, making it essential for traders to stay updated with the latest market information. For more information, visit the Metals-API Website and explore the extensive Metals-API Documentation for detailed guidance on implementation and usage.