The Easiest Way to Get iShares Gold Strategy ETF (IAUF) Historical Rates Using API Integration
The Easiest Way to Get iShares Gold Strategy ETF (IAUF) Historical Rates Using API Integration
In the rapidly evolving world of finance, obtaining accurate and timely data is crucial for making informed investment decisions. For those interested in tracking the historical prices of precious metals, such as gold, the Metals-API offers a powerful solution. This blog post will guide you through the process of retrieving historical rates for the iShares Gold Strategy ETF (IAUF) using the Metals-API, focusing on its capabilities, endpoints, and practical applications.
Metals-API Information
The Metals-API is a comprehensive JSON API that provides real-time and historical data on various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). This API is designed for developers looking to integrate metal price data into their applications, enabling them to build innovative solutions that leverage real-time market insights.
About Gold (XAU)
Gold has long been considered a safe-haven asset, especially during times of economic uncertainty. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. By utilizing advanced technology integration, traders can access real-time data, enhancing their decision-making processes. The Metals-API empowers developers to create next-generation applications that facilitate innovation in price discovery and provide digital asset solutions.
API Description
The Metals-API is designed to provide developers with the tools necessary to access and manipulate precious metals data efficiently. With a focus on innovation and technological advancement, this API allows for seamless integration into various applications, enabling users to obtain real-time and historical data with ease. You can explore the full capabilities of the Metals-API by visiting the Metals-API Website and reviewing the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data needs. Here are some of the key features and their potential applications:
- 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 traders who need up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the endpoint, users can retrieve historical prices for analysis and reporting.
- Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices, which are crucial for executing trades at optimal prices.
- Convert Endpoint: The conversion endpoint enables users to convert amounts from one metal to another or to/from USD, facilitating easy calculations for traders and investors.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it ideal for trend analysis.
- Fluctuation Endpoint: Track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and buyers of precious metals.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date, aiding in market analysis.
- 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: Access historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: The API returns exchange rates relative to USD by default, with all data delivered in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 different endpoints, each providing unique functionalities to meet diverse user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest data.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users informed about market trends and 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.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of responses from various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1766570434,
"base": "USD",
"date": "2025-12-24",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
This response indicates a successful request for the latest rates, providing the current price of gold (XAU) and other metals in relation to USD.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1766484034,
"base": "USD",
"date": "2025-12-23",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to retrieve historical rates for a specific date, allowing users to analyze past market performance.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-12-17",
"end_date": "2025-12-24",
"base": "USD",
"rates": {
"2025-12-17": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-12-19": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-12-24": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to track price changes over a specified period, which is invaluable for trend analysis and forecasting.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1766570434,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates how to convert a specified amount of USD into troy ounces of gold, providing essential information for investors looking to make conversions.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-17",
"end_date": "2025-12-24",
"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 provides insights into how metal prices fluctuate over a specified period, which is critical for understanding market dynamics.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1766570434,
"base": "USD",
"date": "2025-12-24",
"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"
}
The OHLC endpoint is essential for traders who rely on historical price data to make informed trading decisions based on market trends.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1766570434,
"base": "USD",
"date": "2025-12-24",
"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, which are crucial for executing trades effectively.
Conclusion
In conclusion, the Metals-API offers a robust and versatile solution for developers looking to access historical rates for precious metals, including the iShares Gold Strategy ETF (IAUF). By leveraging the various endpoints provided by the API, users can obtain real-time data, historical prices, and valuable market insights. The ability to convert currencies, track fluctuations, and analyze price trends empowers traders and investors to make informed decisions in a dynamic market environment.
For more detailed information on how to integrate the Metals-API into your applications, refer to the Metals-API Documentation. Additionally, explore the Metals-API Supported Symbols to familiarize yourself with the available metal symbols and their specifications. By utilizing the Metals-API, you can unlock the potential of real-time metals data and enhance your trading strategies.