Access abrdn Physical Gold Shares ETF (SGOL) Historical Prices through this API
Access abrdn Physical Gold Shares ETF (SGOL) Historical Prices through this API
In the ever-evolving landscape of financial technology, the ability to access real-time and historical data is paramount for developers and traders alike. One such resource is the Metals-API, which provides comprehensive access to precious metal prices, including the abrdn Physical Gold Shares ETF (SGOL). This blog post delves into the capabilities of the Metals-API, particularly focusing on how to retrieve historical prices for Gold (XAU) and the innovative features that enhance trading and investment strategies.
Metals-API Information
The Metals-API is a powerful tool designed for developers seeking to integrate precious metal pricing data into their applications. With a focus on innovation and technological advancement, this API empowers users to build next-generation applications that leverage real-time metals data. Whether you're developing a trading platform, a financial analysis tool, or a market insights dashboard, the Metals-API provides the necessary data to enhance your offerings.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth preservation and investment. As digital transformation sweeps across the financial sector, the integration of data analytics and market insights into gold trading is becoming increasingly vital. The Metals-API allows developers to harness the power of technology to innovate in price discovery, enabling more accurate and timely trading decisions.
With the rise of digital asset solutions, gold is no longer just a physical commodity; it is becoming a digital asset that can be traded and analyzed in real-time. The Metals-API facilitates this transition by providing developers with the tools needed to access historical prices, current rates, and market fluctuations. This capability is essential for those looking to understand market trends and make informed investment decisions.
API Description
The Metals-API is designed to provide developers with a comprehensive suite of endpoints that deliver real-time and historical data on precious metals. The API's capabilities include:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or more frequently. This feature is crucial for traders who need the most current pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve historical prices for Gold (XAU) and other metals, allowing for in-depth market analysis.
- Bid And Ask Endpoint: This powerful feature enables you to retrieve real-time Bid and Ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion feature, allowing you to convert any amount from one metal to another or to/from USD, facilitating seamless trading operations.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling you to analyze trends over specific periods.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, which is essential for understanding market volatility.
- Carat Endpoint: Access information about Gold rates by Carat, allowing for precise valuation of gold jewelry and other products.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date, which is crucial for traders looking to identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve open, high, low, and close prices for a specific date, providing a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is particularly useful for those trading industrial metals.
- API Key: Your unique API Key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates delivered by the Metals-API are relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The API offers 14 endpoints, each providing different functionalities tailored to various trading and analytical needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals, ensuring you have the latest information at your fingertips.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you informed about market developments.
For more detailed information about the API, you can visit the Metals-API Documentation and explore the Metals-API Supported Symbols.
Key Features and Endpoints
Each endpoint of the Metals-API is designed with specific functionalities that cater to the needs of developers and traders. Below, we explore some of the key features and their applications:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rates for all available metals. This endpoint is particularly useful for traders who require up-to-the-minute pricing information to make informed decisions. The response includes a timestamp, base currency, and rates for various metals, including Gold (XAU).
{
"success": true,
"timestamp": 1763604166,
"base": "USD",
"date": "2025-11-20",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for any date since 1999. This feature is invaluable for conducting market analysis and understanding price trends over time. By appending a specific date to your query, you can retrieve historical prices for Gold (XAU) and other metals.
{
"success": true,
"timestamp": 1763517766,
"base": "USD",
"date": "2025-11-19",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-Series Endpoint
The Time-Series Endpoint enables users to query the API for daily historical rates between two dates of their choice. This feature is particularly useful for analyzing trends and fluctuations over specific periods, allowing traders to make data-driven decisions.
{
"success": true,
"timeseries": true,
"start_date": "2025-11-13",
"end_date": "2025-11-20",
"base": "USD",
"rates": {
"2025-11-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-11-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"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 essential for traders who need to quickly assess the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1763604166,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides insights into how currencies fluctuate on a day-to-day basis. This information is crucial for understanding market volatility and making informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-13",
"end_date": "2025-11-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"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows users to retrieve open, high, low, and close prices for a specific date. This data is essential for traders looking to analyze market performance and make informed decisions based on historical price movements.
{
"success": true,
"timestamp": 1763604166,
"base": "USD",
"date": "2025-11-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"
}
Bid/Ask Endpoint
The Bid/Ask Endpoint provides current bid and ask prices for metals, offering insights into market liquidity and pricing dynamics. This information is crucial for traders looking to execute trades at optimal prices.
{
"success": true,
"timestamp": 1763604166,
"base": "USD",
"date": "2025-11-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"
}
Conclusion
In conclusion, the Metals-API offers a robust and comprehensive solution for accessing historical prices and real-time data for precious metals, including Gold (XAU). With its innovative endpoints and features, developers can build applications that provide valuable insights into market trends and trading opportunities. By leveraging the capabilities of the Metals-API, traders can enhance their decision-making processes and stay ahead in the competitive landscape of precious metal trading.
For further exploration of the API's features, visit the Metals-API Website and dive into the extensive Metals-API Documentation for detailed guidance on implementation and usage. Don't forget to check the Metals-API Supported Symbols for a complete list of available metals and currencies.