Get iShares Gold Trust (IAU) prices using this API for your application
Introduction
In the world of finance, the ability to access real-time data is crucial, especially when it comes to precious metals like gold. The iShares Gold Trust (IAU) is a popular investment vehicle that tracks the price of gold, making it essential for investors and developers to have access to accurate and timely pricing information. This is where the Metals-API comes into play. This powerful API provides developers with the tools they need to integrate gold pricing data into their applications seamlessly.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. In recent years, the digital transformation in precious metals has revolutionized how investors interact with this timeless asset. With the rise of data analytics and market insights, traders can now leverage technology to make informed decisions based on real-time data. The integration of innovative technologies in trading platforms has enhanced price discovery, allowing for more accurate valuations of gold and other precious metals.
Moreover, the emergence of digital asset solutions has opened new avenues for trading and investing in gold. As the market evolves, having access to reliable data becomes increasingly important. The Metals-API provides a comprehensive solution for developers looking to harness the power of real-time metals data, enabling them to build next-generation applications that cater to the needs of modern investors.
API Description
The Metals-API is designed to empower developers by providing a robust set of features that facilitate the integration of precious metals pricing data into applications. With its innovative capabilities, the API enables users to access real-time exchange rates, historical data, and various other functionalities that are essential for effective trading and investment strategies.
One of the standout features of the Metals-API is its ability to deliver real-time data updates. Depending on your subscription plan, the API can provide exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This level of granularity allows developers to create applications that respond to market changes almost instantaneously.
For those interested in historical data, the Metals-API offers access to rates dating back to 2019. This capability is invaluable for conducting market analysis and understanding trends over time. Developers can query the API for historical rates by appending a specific date to their requests, allowing for detailed analysis of price movements.
Additionally, the API includes a Bid and Ask endpoint, which provides real-time bid and ask prices for various metals. This feature is particularly useful for traders looking to make informed decisions based on current market conditions. The Convert endpoint allows users to convert any amount from one metal to another or to/from USD, making it easy to manage transactions across different currencies.
The Timeseries endpoint enables users to query the API for daily historical rates between two dates of their choice, providing a comprehensive view of price movements over time. The Fluctuation endpoint tracks how currencies fluctuate on a day-to-day basis, offering insights into market volatility.
For those interested in gold rates by carat, the Carat endpoint provides detailed information, allowing users to retrieve gold rates based on carat specifications. The Lowest/Highest Price endpoint allows users to query the API for the lowest and highest prices over a specified period, while the Open/High/Low/Close (OHLC) Price endpoint provides detailed price data for specific timeframes.
To ensure seamless integration, the Metals-API requires an API Key, which is passed into the API base URL's access_key parameter. This key is essential for authentication and authorization, ensuring that only authorized users can access the data.
Key Features and Endpoints
The Metals-API comes equipped with a variety of endpoints, each designed to serve specific functionalities:
- Latest Rates Endpoint: This endpoint provides real-time exchange rates for all available metals. For example, a typical response might look like this:
{
"success": true,
"timestamp": 1769386556,
"base": "USD",
"date": "2026-01-26",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
- Historical Rates Endpoint: Access historical exchange rates for any date since 1999. A sample response could be:
{
"success": true,
"timestamp": 1769300156,
"base": "USD",
"date": "2026-01-25",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
- Time-Series Endpoint: This endpoint allows users to get exchange rates for a specific time period. An example response might be:
{
"success": true,
"timeseries": true,
"start_date": "2026-01-19",
"end_date": "2026-01-26",
"base": "USD",
"rates": {
"2026-01-19": {
"XAU": 0.000485,
"XAG": 0.03825
},
"2026-01-26": {
"XAU": 0.000482,
"XAG": 0.03815
}
},
"unit": "per troy ounce"
}
- Convert Endpoint: This feature allows users to convert any amount from one metal to another or to/from USD. A typical response would be:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1769386556,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
- Fluctuation Endpoint: This endpoint tracks rate fluctuations between two dates. An example response could be:
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-19",
"end_date": "2026-01-26",
"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: This endpoint provides OHLC data for a specific time period. A sample response might look like this:
{
"success": true,
"timestamp": 1769386556,
"base": "USD",
"date": "2026-01-26",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
- Bid/Ask Endpoint: This feature provides current bid and ask prices for metals. An example response could be:
{
"success": true,
"timestamp": 1769386556,
"base": "USD",
"date": "2026-01-26",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"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 understand the various metals available for trading and analysis.
Conclusion
The iShares Gold Trust (IAU) represents a significant opportunity for investors looking to gain exposure to gold. By leveraging the capabilities of the Metals-API, developers can create powerful applications that provide real-time pricing data, historical insights, and advanced analytics for gold and other precious metals. The API's extensive features, including the Latest Rates, Historical Rates, and various conversion options, make it an essential tool for anyone involved in the trading and investment of precious metals.
As the market continues to evolve, the importance of accurate and timely data cannot be overstated. By integrating the Metals-API into your applications, you can ensure that your users have access to the information they need to make informed decisions in a fast-paced trading environment. For more information on how to get started, visit the Metals-API Documentation to explore the full range of features and capabilities available.