Developers' guide to get abrdn Physical Gold Shares ETF (SGOL) prices with this API
Introduction
In the ever-evolving landscape of financial markets, the demand for precise and real-time data is paramount, especially when it comes to precious metals like gold. For developers looking to access the latest prices of the abrdn Physical Gold Shares ETF (SGOL), leveraging the Metals-API can be a game-changer. This powerful API provides comprehensive access to real-time and historical data on various metals, including gold, enabling developers to create innovative applications that enhance trading strategies and market analysis.
Understanding Gold (XAU)
Gold, represented by the symbol XAU, is not just a commodity; it is a cornerstone of financial stability and investment. As digital transformation sweeps across industries, the precious metals market is also experiencing significant changes. The integration of technology in trading has led to enhanced data analytics and market insights, allowing traders to make informed decisions based on real-time data. The Metals-API Documentation provides developers with the tools needed to tap into this wealth of information.
Digital Transformation in Precious Metals
The rise of digital asset solutions has revolutionized how investors interact with precious metals. With the Metals-API, developers can access real-time gold prices, historical trends, and market fluctuations, enabling them to build applications that provide users with actionable insights. This digital transformation not only enhances trading efficiency but also democratizes access to precious metals data.
Data Analytics and Market Insights
Data analytics plays a crucial role in understanding market dynamics. By utilizing the Metals-API, developers can analyze historical price movements, track fluctuations, and identify trends that inform trading strategies. The API's various endpoints allow for detailed analysis, including the ability to retrieve historical rates dating back to 2019, providing a comprehensive view of market behavior.
Technology Integration in Trading
Integrating technology into trading processes is essential for modern investors. The Metals-API offers endpoints that facilitate seamless integration of real-time data into trading platforms. For instance, the Latest Rates Endpoint provides up-to-the-minute exchange rate data, allowing developers to create applications that reflect the current market conditions accurately.
Innovation in Price Discovery
Price discovery is a critical aspect of trading, and the Metals-API empowers developers to innovate in this space. By leveraging the API's capabilities, developers can create tools that not only display current prices but also analyze historical data to predict future movements. This innovation can lead to more informed trading decisions and improved investment outcomes.
API Description
The Metals-API is a robust solution for accessing real-time and historical data on precious metals. It provides developers with the ability to build next-generation applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. With a focus on technological advancement, the API empowers developers to harness the transformative potential of real-time metals data.
Key Features of Metals-API
The Metals-API offers a variety of endpoints that cater to different data needs:
- 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 feature is crucial for developers who need the most current pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. Developers can query the Metals-API for historical rates by appending a date in the format YYYY-MM-DD, allowing for in-depth market analysis.
- Bid and Ask Endpoint: This powerful feature enables developers to retrieve real-time bid and ask prices, essential for understanding market liquidity and making informed trading decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one currency to another, facilitating seamless transactions.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling developers to analyze trends over specific periods.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Access information about gold rates by carat, allowing for precise valuation of gold jewelry and other items.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specific date, which is useful for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve OHLC data for a specific time period, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Your unique API key is required for authentication and is passed into the API base URL's access_key parameter.
- 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 14 endpoints, each providing different functionalities to cater to diverse data needs.
- Supported Symbols Endpoint: Access a constantly updated endpoint returning all available currencies, ensuring developers have the latest information.
- Intraday Endpoint: Query intraday exchange rate data for a single symbol, essential for high-frequency trading applications.
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 various metals into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
Get real-time exchange rates for all available metals. Below is an example response:
{
"success": true,
"timestamp": 1786147685,
"base": "USD",
"date": "2026-08-08",
"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 that 1 troy ounce of gold (XAU) is priced at 0.000482 USD, providing developers with the necessary data to display current market prices.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999. Here’s an example response:
{
"success": true,
"timestamp": 1786061285,
"base": "USD",
"date": "2026-08-07",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This endpoint allows developers to retrieve historical data, which can be crucial for analyzing trends and making predictions based on past performance.
Time-Series Endpoint
Get exchange rates for a specific time period. Below is an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-08-01",
"end_date": "2026-08-08",
"base": "USD",
"rates": {
"2026-08-01": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-03": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-08": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint is particularly useful for developers looking to visualize trends over time, allowing for more informed trading decisions.
Convert Endpoint
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": 1786147685,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint allows developers to facilitate transactions by converting currencies, enhancing the user experience in trading applications.
Fluctuation Endpoint
Track rate fluctuations between two dates. Below is an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-01",
"end_date": "2026-08-08",
"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 is essential for developers looking to analyze market volatility and make informed decisions based on rate changes over time.
OHLC (Open/High/Low/Close) Price Endpoint
Get OHLC data for a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1786147685,
"base": "USD",
"date": "2026-08-08",
"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 is crucial for technical analysis, allowing developers to assess market performance over specific periods.
Bid/Ask Endpoint
Get current bid and ask prices for metals. Below is an example response:
{
"success": true,
"timestamp": 1786147685,
"base": "USD",
"date": "2026-08-08",
"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 essential information for traders, allowing them to understand market liquidity and make informed decisions based on current bid and ask prices.
Conclusion
The Metals-API is an invaluable resource for developers looking to access real-time and historical data on precious metals, particularly gold. By leveraging its various endpoints, developers can create innovative applications that enhance trading strategies, provide market insights, and facilitate seamless transactions. The API's capabilities, including the Latest Rates, Historical Rates, and Bid/Ask endpoints, empower developers to build next-generation applications that meet the demands of modern investors.
For more information, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation and usage. Understanding the full potential of the Metals-API can lead to significant advancements in how developers approach precious metals trading and analysis.