Retrieve iShares Gold Trust (IAU) price data through this API

Retrieve iShares Gold Trust (IAU) Price Data Through This API
The iShares Gold Trust (IAU) is a popular investment vehicle that allows investors to gain exposure to the price of gold without the need to physically own the metal. As the demand for gold continues to rise, driven by its status as a safe-haven asset, the ability to access real-time price data is crucial for traders and investors alike. This is where the Metals-API comes into play, providing comprehensive and real-time data on gold and other precious metals.
Metals-API Information
The Metals-API is a powerful tool designed for developers looking to integrate real-time metals data into their applications. With its extensive capabilities, the API allows users to retrieve current and historical price data for various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). The API is built with innovation and technological advancement in mind, enabling developers to create next-generation applications that leverage real-time data analytics and market insights.
About Gold (XAU)
Gold has long been recognized as a valuable asset, serving as a hedge against inflation and economic uncertainty. In recent years, the digital transformation in precious metals has opened new avenues for trading and investment. The integration of data analytics and technology in trading has revolutionized how investors approach the gold market. With the rise of digital asset solutions, gold can now be traded more efficiently, allowing for better price discovery and market transparency.
As the market evolves, the demand for accurate and timely data becomes increasingly important. The Metals-API provides developers with the tools necessary to access this data, enabling them to build applications that can analyze market trends, track price fluctuations, and provide insights into trading strategies.
API Description
The Metals-API is designed to empower developers by providing a robust set of features that facilitate the retrieval of real-time and historical metals data. With a focus on innovation, the API allows users to access various endpoints that cater to different data needs. Whether you are looking for the latest rates, historical data, or conversion functionalities, the Metals-API has you covered.
For detailed information on how to implement the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on using the API effectively.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to serve specific data retrieval needs:
- 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 or every 10 minutes, ensuring that users have access to the most current market information.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019. By appending a specific date to the API request, developers can retrieve past price data, which is essential for trend analysis and market research.
- 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 dynamics.
- Convert Endpoint: The API includes a currency conversion feature, enabling users to convert amounts between different metals or to/from USD. This is particularly useful for traders who operate in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates, making it easier to analyze price trends over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, which is essential for jewelers and those involved in the jewelry market.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is crucial for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific time period, allowing traders to analyze market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for those focusing on industrial metals.
- API Key: Each user is assigned a unique API key, which must be included in the API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The API provides a constantly updated list of available currencies and metals, ensuring users have access to the latest data.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price specifically for the Indian market.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market 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
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1747724412,
"base": "USD",
"date": "2025-05-20",
"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
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1747638012,
"base": "USD",
"date": "2025-05-19",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-13",
"end_date": "2025-05-20",
"base": "USD",
"rates": {
"2025-05-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747724412,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-13",
"end_date": "2025-05-20",
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1747724412,
"base": "USD",
"date": "2025-05-20",
"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
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1747724412,
"base": "USD",
"date": "2025-05-20",
"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"
}
Conclusion
In conclusion, the iShares Gold Trust (IAU) represents a significant opportunity for investors looking to gain exposure to gold. The Metals-API provides a comprehensive suite of tools that empower developers to access real-time and historical data on gold and other precious metals. With features such as the latest rates, historical data, and conversion capabilities, the API is an invaluable resource for anyone involved in the trading or investment of precious metals.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance trading strategies, provide market insights, and facilitate better decision-making. For more information on how to get started, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation.