Get abrdn Physical Gold Shares ETF (SGOL) Historical Prices for Data Analysis using this API

Get abrdn Physical Gold Shares ETF (SGOL) Historical Prices for Data Analysis using this API
The abrdn Physical Gold Shares ETF (SGOL) is a popular investment vehicle for those looking to gain exposure to gold without the complexities of physical ownership. For developers and analysts interested in conducting data analysis on SGOL, accessing historical prices is crucial. This can be efficiently achieved using the Metals-API, a powerful tool that provides real-time and historical data on precious metals, including gold (XAU). In this blog post, we will delve into the capabilities of the Metals-API, explore how to retrieve historical prices, and discuss the broader implications of digital transformation in the precious metals market.
Metals-API Information
The Metals-API is designed to empower developers with real-time and historical data on various metals. It serves as a bridge between market data and application development, enabling the creation of innovative solutions in trading, data analytics, and market insights. With its robust architecture, the Metals-API offers a suite of endpoints that cater to diverse needs, from retrieving the latest rates to accessing historical data dating back to 2019.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, making it a preferred asset for investors. In recent years, the digital transformation in precious metals has revolutionized how investors and traders interact with this valuable commodity. The integration of technology in trading has led to enhanced price discovery mechanisms, allowing for more accurate and timely market insights.
Data analytics plays a pivotal role in understanding market trends and making informed investment decisions. By leveraging the Metals-API, developers can access a wealth of historical data, enabling them to perform in-depth analyses and derive actionable insights. The API's capabilities extend beyond mere data retrieval; it empowers users to build next-generation applications that can analyze price fluctuations, assess market conditions, and optimize trading strategies.
API Description
The Metals-API is a comprehensive JSON API that provides access to a wide range of metal prices and currency conversion functionalities. It is designed for developers looking to integrate real-time and historical metals data into their applications. The API supports various endpoints, each tailored to specific functionalities, such as retrieving the latest rates, historical data, and even bid and ask prices.
One of the standout features of the Metals-API is its ability to deliver real-time data updates. Depending on your subscription plan, the API can provide updates every 60 minutes, every 10 minutes, or even more frequently. This level of granularity allows developers to create applications that respond to market changes in real-time, enhancing the user experience and providing a competitive edge.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals, updated according to your subscription plan. For example, you can retrieve the latest gold price in USD with a simple API call.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your request, you can retrieve past prices, which is essential for data analysis.
- Bid And Ask Endpoint: This feature allows you to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The conversion endpoint enables you to convert amounts from one metal to another or to/from USD, facilitating seamless transactions and calculations.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, allowing for trend analysis over specific periods.
- Fluctuation Endpoint: Track how metal prices 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 those in the jewelry industry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specific date range, aiding in performance analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access 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, useful for those interested in industrial metals.
- API Key: Your unique API key is essential for accessing the API and must be included in your requests.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in your data analysis.
- Available Endpoints: The Metals-API comes with numerous endpoints, each providing distinct functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies and metal symbols, ensuring you have the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India using the dedicated endpoint, catering to regional market needs.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context to market movements.
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
Understanding the API's response structure is crucial for effective implementation. Below are examples of various endpoints and their JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1749985212,
"base": "USD",
"date": "2025-06-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"
}
This response provides the latest exchange rates for various metals, with gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1749898812,
"base": "USD",
"date": "2025-06-14",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to access historical rates for a specific date, allowing for retrospective analysis of price movements.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-06-08",
"end_date": "2025-06-15",
"base": "USD",
"rates": {
"2025-06-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-15": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows you to retrieve daily rates over a specified period, which is essential for trend analysis.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1749985212,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint demonstrates how to convert an amount from one metal to another, providing a seamless way to handle transactions.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-08",
"end_date": "2025-06-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"
}
This response provides insights into how metal prices fluctuate over a specified period, which is crucial for understanding market dynamics.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1749985212,
"base": "USD",
"date": "2025-06-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"
}
The OHLC endpoint is vital for traders who rely on historical price data to make informed decisions based on market trends.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1749985212,
"base": "USD",
"date": "2025-06-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"
}
This endpoint provides current bid and ask prices, which are essential for traders looking to execute orders at optimal prices.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers and analysts seeking to access historical prices and real-time data for precious metals like gold (XAU). By leveraging its robust features, including various endpoints for retrieving rates, historical data, and price fluctuations, users can gain deep insights into market trends and make informed investment decisions.
The digital transformation in the precious metals market is reshaping how investors interact with these assets. With the integration of technology and data analytics, the Metals-API stands at the forefront of this evolution, providing the tools necessary for next-generation applications. Whether you are developing a trading platform, conducting market research, or simply analyzing historical price trends, the Metals-API offers the capabilities you need to succeed.
For more information on how to implement these features and access the full range of functionalities, refer to the Metals-API Documentation. To explore the complete list of supported symbols, visit the Metals-API Supported Symbols page. Start harnessing the power of real-time metals data today with the Metals-API Website.