Retrieve iShares Gold Strategy ETF (IAUF) Historical Prices with this API

Retrieve iShares Gold Strategy ETF (IAUF) Historical Prices with this API
In the world of finance, the ability to access historical prices of assets is crucial for making informed investment decisions. For those interested in precious metals, particularly gold, the iShares Gold Strategy ETF (IAUF) represents a significant investment vehicle. This blog post will delve into how to retrieve historical prices for IAUF using the Metals-API, a powerful tool that provides real-time and historical data on various metals, including gold.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a symbol of wealth and a safe haven for investors during times of economic uncertainty. The digital transformation in the precious metals market has revolutionized how investors access and analyze gold prices. With the advent of data analytics and market insights, traders can now leverage technology to make more informed decisions. The integration of advanced trading technologies has led to innovative price discovery methods, allowing for more accurate and timely information on gold prices.
Moreover, the rise of digital asset solutions has made it easier for investors to trade gold in various forms, including ETFs like IAUF. This ETF tracks the price of gold bullion, providing investors with a convenient way to gain exposure to the gold market without the need to physically hold the metal. The Metals-API plays a crucial role in this ecosystem by offering developers the tools they need to build applications that can access real-time and historical gold price data.
API Description
The Metals-API is designed to empower developers with the ability to access comprehensive metals data through a simple and efficient API. This API provides real-time exchange rates, historical data, and various endpoints that cater to different needs. The transformative potential of real-time metals data cannot be overstated; it allows developers to create next-generation applications that can analyze trends, forecast prices, and provide insights into the metals market.
With Metals-API, users can access a wide range of features, including:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Users can retrieve historical rates for most currencies dating back to 2019. By appending a specific date to the API call, developers can access past prices for analysis.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing.
- Convert Endpoint: This endpoint enables users to convert any amount from one metal to another or to/from USD, facilitating easy calculations for traders.
- Time-Series Endpoint: Users can query the API for daily historical rates between two chosen dates, allowing for in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information on how metal prices fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers interested in purchasing gold jewelry.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest prices for a specified date range.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, which is essential for technical analysis.
- Historical LME Endpoint: Users can access historical rates for LME symbols dating back to 2008, which is crucial for those trading industrial metals.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a variety of endpoints, each designed to fulfill specific data retrieval needs.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint.
- News Endpoint: This feature allows users to access the latest news articles related to various metals, keeping them informed about market trends.
Key Features and Endpoints
The Metals-API is equipped with several key features that enhance its usability for developers and traders alike. Here are some of the most notable endpoints and their functionalities:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rates for all available metals. Depending on your subscription plan, the API can return data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need up-to-the-minute pricing information to make quick decisions.
{
"success": true,
"timestamp": 1745892401,
"base": "USD",
"date": "2025-04-29",
"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"
}
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for any date since 1999. This is particularly useful for conducting trend analysis and understanding how gold prices have changed over time.
{
"success": true,
"timestamp": 1745806001,
"base": "USD",
"date": "2025-04-28",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
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 analyzing price movements over specific periods.
{
"success": true,
"timeseries": true,
"start_date": "2025-04-22",
"end_date": "2025-04-29",
"base": "USD",
"rates": {
"2025-04-22": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-24": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-29": {
"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 is particularly useful for traders who need to quickly calculate the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1745892401,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how metal prices fluctuate on a day-to-day basis. This feature is essential for traders looking to understand market volatility and make informed decisions based on price changes.
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-22",
"end_date": "2025-04-29",
"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 query the API to get the open, high, low, and close prices for a specific date. This data is crucial for technical analysis and helps traders identify trends and potential entry or exit points.
{
"success": true,
"timestamp": 1745892401,
"base": "USD",
"date": "2025-04-29",
"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, which is essential for understanding market liquidity and making informed trading decisions.
{
"success": true,
"timestamp": 1745892401,
"base": "USD",
"date": "2025-04-29",
"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"
}
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 metals data into their applications.
Conclusion
In summary, the ability to retrieve historical prices for the iShares Gold Strategy ETF (IAUF) using the Metals-API is a game-changer for investors and developers alike. The API's robust features, including real-time rates, historical data, and various endpoints, empower users to make informed decisions based on accurate and timely information. By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance trading strategies and provide valuable insights into the precious metals market.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation. This resource provides detailed guidance on using the API effectively, including endpoint descriptions, parameter details, and example responses. With the right tools and knowledge, you can harness the power of real-time metals data to optimize your trading strategies and investment decisions.