Get Historical Pricing Information for iShares Gold Strategy ETF (IAUF) using this API
In the world of finance, understanding the historical pricing information of assets is crucial for making informed investment decisions. One such asset is the iShares Gold Strategy ETF (IAUF), which provides exposure to gold prices. To effectively analyze the historical prices of IAUF, developers can leverage the capabilities of the Metals-API. This blog post will explore how to obtain historical pricing information for IAUF using the Metals-API, focusing on the innovative features and endpoints that facilitate this process.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of financial markets. As a precious metal, it serves not only as a store of value but also as a hedge against inflation and economic uncertainty. The digital transformation in precious metals trading has opened new avenues for investors and developers alike. With the rise of data analytics and market insights, understanding gold's price movements has become more accessible than ever.
Technology integration in trading has revolutionized how investors interact with gold markets. The advent of APIs like Metals-API allows developers to create applications that provide real-time data, historical pricing, and analytical tools. This innovation in price discovery empowers users to make data-driven decisions, enhancing their trading strategies.
Moreover, digital asset solutions are reshaping how gold is perceived in the financial ecosystem. By utilizing APIs, developers can build applications that not only track gold prices but also analyze trends, fluctuations, and market sentiments. This comprehensive approach to data empowers investors to navigate the complexities of the gold market effectively.
Metals-API Overview
The Metals-API is a powerful tool designed to provide real-time and historical data for various metals, including gold. It offers a wide range of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019. The API's capabilities enable developers to build next-generation applications that leverage real-time metals data for various use cases.
For more information about the API, you can visit the Metals-API Website or check the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API provides several key features that developers can utilize to access and analyze gold pricing information:
- 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 traders who need up-to-the-minute information on gold prices.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. By appending a specific date (YYYY-MM-DD) to the endpoint, developers can query the Metals-API for historical rates, allowing for in-depth analysis of price trends over time.
- Bid and Ask Endpoint: This powerful feature retrieves real-time bid and ask prices for gold and other metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This feature is particularly useful for investors looking to assess the value of their holdings in different currencies.
- Time-Series Endpoint: This endpoint allows developers to query the API for daily historical rates between two dates of their choice, facilitating comprehensive trend analysis.
- Fluctuation Endpoint: By using this endpoint, users can track how gold prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and those involved in the gold trade.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API for the lowest and highest price of gold within a specified timeframe, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for gold, which are critical for technical analysis and trading strategies.
- Historical LME Endpoint: For those interested in LME symbols, this endpoint provides historical rates dating back to 2008, allowing for extensive market research.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The API features 14 endpoints, each providing distinct functionalities, ensuring comprehensive coverage of metals data.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, allowing developers to stay informed about the latest symbols.
- News Endpoint: The Metals-API includes a news feature that retrieves the latest articles related to various metals, keeping users updated on market trends.
Example API Responses
Understanding the structure of API responses is essential for effective integration. Below are examples of JSON responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1773447226,
"base": "USD",
"date": "2026-03-14",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
This response provides the latest exchange rates for gold (XAU) and other metals, indicating their value relative to USD.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1773360826,
"base": "USD",
"date": "2026-03-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows historical rates for a specific date, allowing developers to analyze past pricing trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-03-07",
"end_date": "2026-03-14",
"base": "USD",
"rates": {
"2026-03-07": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-09": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-14": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of exchange rates between two specified dates, which is invaluable for trend analysis.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1773447226,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert a specified amount from USD to gold (XAU), providing the equivalent value in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-07",
"end_date": "2026-03-14",
"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 prices fluctuate over a specified period, highlighting both absolute and percentage changes.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1773447226,
"base": "USD",
"date": "2026-03-14",
"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 essential data for traders, showing the open, high, low, and close prices for gold, which are critical for technical analysis.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1773447226,
"base": "USD",
"date": "2026-03-14",
"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 current bid and ask prices for gold, which are essential for understanding market dynamics and executing trades effectively.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of features that empower developers to access and analyze historical pricing information for the iShares Gold Strategy ETF (IAUF) and other precious metals. By leveraging endpoints such as the Latest Rates, Historical Rates, and Time-Series, developers can create robust applications that provide valuable insights into gold pricing trends.
As the financial landscape continues to evolve, the integration of technology in trading and data analytics will play a pivotal role in shaping investment strategies. The Metals-API stands at the forefront of this transformation, providing the tools necessary for developers to harness the power of real-time metals data.
For further exploration of the Metals-API, including a complete list of supported symbols, visit the Metals-API Supported Symbols page. By utilizing these resources, developers can enhance their applications and provide users with the most accurate and timely information available.