Get abrdn Physical Gold Shares ETF (SGOL) Historical Data through this API

Get abrdn Physical Gold Shares ETF (SGOL) Historical Data through this API
In the world of finance, the ability to access historical data for precious metals like gold is crucial for investors and developers alike. The abrdn Physical Gold Shares ETF (SGOL) is a popular investment vehicle that allows individuals to gain exposure to gold without the complexities of physical ownership. To effectively analyze and track the performance of SGOL, developers can leverage the Metals-API, a powerful tool designed to provide real-time and historical data on various metals, including gold (XAU). This blog post will delve into the capabilities of Metals-API, focusing on how to retrieve historical prices and other valuable insights related to gold.
Metals-API Information
Metals-API is a robust platform that offers developers access to a wealth of data regarding precious metals. With its user-friendly interface and comprehensive documentation, it empowers developers to create innovative applications that can analyze market trends, perform data analytics, and provide insights into the precious metals market. The API is designed to facilitate digital transformation in the trading of metals, integrating technology to enhance price discovery and provide real-time data analytics.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset, especially during times of economic uncertainty. Its intrinsic value and historical significance make it a preferred choice for investors. The digital transformation in precious metals trading has led to the integration of advanced technologies, enabling real-time data analytics and market insights. With the rise of digital asset solutions, investors can now access gold prices and historical data at their fingertips.
One of the key advantages of using the Metals-API is its ability to provide detailed market insights through data analytics. Developers can utilize this data to build applications that analyze trends, forecast prices, and make informed investment decisions. The integration of technology in trading has revolutionized the way investors interact with precious metals, making it easier to track performance and execute trades.
API Description
The Metals-API is designed to provide developers with a comprehensive suite of tools to access real-time and historical data for various metals. The API's capabilities include retrieving the latest rates, historical prices, bid and ask prices, and much more. This empowers developers to build next-generation applications that can analyze and visualize precious metals data effectively.
For detailed information on how to get started, visit the Metals-API Documentation. The documentation provides comprehensive guidance on how to implement the API, including authentication, endpoint usage, and response handling.
Key Features and Endpoints
The Metals-API offers several key features that enhance its functionality for developers:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This allows developers to access the most current market rates for gold and other metals.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. Developers can query the Metals-API for historical rates by appending a date to the endpoint. This is particularly useful for analyzing trends over time and making informed investment decisions.
- Bid And Ask Endpoint: This powerful feature enables developers to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing developers to convert any amount from one currency to another. This is essential for applications that require multi-currency support.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice. This feature is invaluable for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, allowing developers to track volatility and market trends.
- Carat Endpoint: Developers can retrieve information about gold rates by carat, which is particularly useful for applications focused on jewelry and precious metal trading.
- Lowest/Highest Price Endpoint: This endpoint allows developers to query the API to get the lowest and highest price for a specified date, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access open, high, low, and close prices for a specific date, which is essential for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: The API Key is a unique identifier that must be passed into the API base URL's access_key parameter for authentication.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API comes with a constantly updated endpoint returning all available currencies and metals, ensuring developers have access to the latest data.
- Gold Price India Endpoint: This dedicated endpoint allows developers to retrieve the latest gold price in India, catering to regional market needs.
- News Endpoint: The Metals-API provides access to the latest news articles related to various metals, keeping developers informed about market developments.
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.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1747285216,
"base": "USD",
"date": "2025-05-15",
"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
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1747198816,
"base": "USD",
"date": "2025-05-14",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2025-05-08",
"end_date": "2025-05-15",
"base": "USD",
"rates": {
"2025-05-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-15": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747285216,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-08",
"end_date": "2025-05-15",
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1747285216,
"base": "USD",
"date": "2025-05-15",
"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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1747285216,
"base": "USD",
"date": "2025-05-15",
"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"
}
Conclusion
In conclusion, the Metals-API provides a comprehensive and innovative solution for developers looking to access historical data for precious metals like gold. By leveraging the various endpoints offered by the API, developers can create powerful applications that analyze market trends, track price fluctuations, and provide valuable insights to investors. The ability to access real-time and historical data empowers developers to build next-generation applications that cater to the evolving needs of the financial market.
For more information on how to implement the Metals-API, visit the Metals-API Documentation. To explore the full range of supported symbols, check out the Metals-API Supported Symbols page. With the right tools and data at your disposal, you can unlock the full potential of precious metals trading and investment.