Discover how to fetch abrdn Physical Gold Shares ETF (SGOL) prices with this API
Discover how to fetch abrdn Physical Gold Shares ETF (SGOL) prices with this API
In the ever-evolving world of finance, the ability to access real-time data is crucial for making informed investment decisions. For those interested in the abrdn Physical Gold Shares ETF (SGOL), understanding how to fetch its prices through an API can significantly enhance trading strategies. This blog post will delve into the capabilities of the Metals-API, a powerful tool for retrieving precious metals data, including gold prices, and how it can be leveraged to track SGOL effectively.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and its significance in the financial markets cannot be overstated. As digital transformation sweeps across various sectors, the precious metals market is no exception. The integration of data analytics and technology into trading has opened new avenues for investors. With the rise of digital asset solutions, understanding the dynamics of gold prices is more accessible than ever.
Investors can now utilize advanced data analytics to gain market insights, allowing them to make informed decisions based on real-time data. The Metals-API provides a robust platform for accessing this data, enabling developers to create applications that can track gold prices, analyze trends, and optimize trading strategies.
API Description
The Metals-API is designed to empower developers with real-time metals data, facilitating the creation of next-generation applications. This API offers a wide range of functionalities, including the ability to fetch the latest rates, historical data, and even perform currency conversions. By leveraging the Metals-API, developers can build applications that provide users with up-to-date information on gold prices, including those for the abrdn Physical Gold Shares ETF (SGOL).
With the API's innovative capabilities, users can access data that reflects the current market conditions, enabling them to make timely investment decisions. The API's real-time data updates ensure that users are always informed about the latest price movements, which is crucial for trading strategies.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to cater to specific needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, every 10 minutes, or even more frequently, depending on your subscription plan. This feature is essential for tracking the current price of gold and other metals.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019. By appending a date in the format YYYY-MM-DD, developers can query the Metals-API for past prices, allowing for comprehensive market analysis.
- Bid And Ask Endpoint: This powerful feature enables users 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 users to convert amounts from one metal to another or to/from USD. This is particularly useful for investors looking to understand the value of their holdings in different currencies.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two dates of their choice, enabling detailed trend analysis over specific periods.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and price trends.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access the open, high, low, and close prices for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, which is valuable for those tracking industrial metals.
- API Key: Each user is assigned a unique API key that must be included in the API requests to authenticate and authorize access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The API offers 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, making it easy for users to find the symbols they need.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them 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 metals into their applications.
API Endpoint Examples and Responses
Understanding how to interpret API responses is crucial for effective integration. Below are examples of various API endpoints and their responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1776298292,
"base": "USD",
"date": "2026-04-16",
"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 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.
{
"success": true,
"timestamp": 1776211892,
"base": "USD",
"date": "2026-04-15",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows the historical rates for gold and other metals on a specific date, allowing for trend analysis.
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2026-04-09",
"end_date": "2026-04-16",
"base": "USD",
"rates": {
"2026-04-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-16": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of gold prices, enabling users to analyze trends over the specified period.
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": 1776298292,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example demonstrates how to convert a specified amount of USD into gold (XAU), providing the resulting quantity in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-09",
"end_date": "2026-04-16",
"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 gold and other metals have fluctuated over a specified period, which is vital for understanding market volatility.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1776298292,
"base": "USD",
"date": "2026-04-16",
"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 endpoint provides the open, high, low, and close prices for metals, which are essential for technical analysis and trading strategies.
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1776298292,
"base": "USD",
"date": "2026-04-16",
"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 current bid and ask prices for metals, allowing traders to gauge market conditions and make informed decisions.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers and investors looking to track the prices of precious metals, including the abrdn Physical Gold Shares ETF (SGOL). With its comprehensive range of endpoints and real-time data capabilities, this API empowers users to make informed trading decisions based on accurate market insights.
By leveraging the various features of the Metals-API, such as the latest rates, historical data, and bid/ask prices, developers can create sophisticated applications that enhance the trading experience. Whether you're a seasoned investor or a developer looking to integrate metals data into your applications, the Metals-API provides the tools necessary to succeed in today's dynamic financial landscape.
For more information on how to get started, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation. Don't forget to check the Metals-API Supported Symbols page to familiarize yourself with the available metal symbols.