Extract iShares Gold Trust (IAU) prices from this API
Extract iShares Gold Trust (IAU) Prices from the Metals-API
The iShares Gold Trust (IAU) is a popular investment vehicle that allows investors to gain exposure to the price of gold without the complexities of physical ownership. In today's digital age, accessing real-time data on gold prices is crucial for making informed investment decisions. The Metals-API provides a robust solution for developers looking to integrate gold price data into their applications. This blog post will delve into the capabilities of the Metals-API, focusing on how it can be utilized to extract prices for the iShares Gold Trust (IAU) and other precious metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. As a precious metal, it serves various purposes, from jewelry to investment and as a hedge against inflation. In recent years, the digital transformation in precious metals has revolutionized how investors access and analyze market data. With the integration of data analytics and technology, traders can now gain insights into market trends and make informed decisions based on real-time information.
The innovation in price discovery has been significantly enhanced by digital asset solutions, allowing for more transparent and efficient trading. The Metals-API plays a pivotal role in this transformation, providing developers with the tools necessary to build next-generation applications that leverage real-time metals data.
API Description
The Metals-API is a powerful tool that offers developers access to real-time and historical data for various metals, including gold, silver, platinum, and palladium. With its comprehensive features, the API empowers developers to create applications that can track market fluctuations, analyze historical trends, and convert between different metal currencies.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on the subscription plan, users can receive updates every 60 minutes, every 10 minutes, or even more frequently. This capability is essential for traders who need to stay ahead of market movements.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to provide specific functionalities that cater to different user needs. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint allows users to retrieve real-time exchange rates for all available metals. This endpoint is particularly useful for traders who need immediate access to current market prices. The response includes the base currency, the date of the rates, and the current rates for various metals.
{
"success": true,
"timestamp": 1763528448,
"base": "USD",
"date": "2025-11-19",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
For those interested in analyzing trends over time, the Historical Rates Endpoint provides access to historical exchange rates dating back to 2019. Users can query the API for specific dates, allowing for in-depth analysis of price movements.
{
"success": true,
"timestamp": 1763442048,
"base": "USD",
"date": "2025-11-18",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables users to retrieve real-time bid and ask prices for metals. This information is crucial for traders looking to execute buy or sell orders at optimal prices.
{
"success": true,
"timestamp": 1763528448,
"base": "USD",
"date": "2025-11-19",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"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 particularly useful for investors who want to understand the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1763528448,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for conducting technical analysis and understanding price trends over time.
{
"success": true,
"timeseries": true,
"start_date": "2025-11-12",
"end_date": "2025-11-19",
"base": "USD",
"rates": {
"2025-11-12": {
"XAU": 0.000485
},
"2025-11-19": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how metal prices fluctuate on a day-to-day basis. This feature is essential for understanding market volatility and making informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-12",
"end_date": "2025-11-19",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows users to retrieve the open, high, low, and close prices for a specific time period. This data is crucial for traders who rely on candlestick charts for technical analysis.
{
"success": true,
"timestamp": 1763528448,
"base": "USD",
"date": "2025-11-19",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for those looking to analyze long-term trends in metal prices.
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.
Conclusion
The Metals-API is a transformative tool for developers seeking to access real-time and historical data on precious metals, including gold. With its extensive range of endpoints, developers can create powerful applications that provide insights into market trends, facilitate trading, and enhance investment strategies. By leveraging the capabilities of the Metals-API, developers can ensure that their applications are equipped with the most accurate and timely data available.
For more information on how to get started with the Metals-API, check out the Metals-API Documentation. This resource provides detailed guidance on authentication, endpoint usage, and best practices for integrating the API into your applications. By utilizing the Metals-API, you can stay ahead in the fast-paced world of precious metals trading.