Retrieve iShares Gold Strategy ETF (IAUF) Daily Closing Prices using Metals-API

Retrieve iShares Gold Strategy ETF (IAUF) Daily Closing Prices using Metals-API
Metals-API, a powerful tool that provides real-time and historical data on various metals, including gold.
Metals-API Information
About Gold (XAU)
API Description
Metals-API Documentation. Here, you will find comprehensive guides on how to implement various features and endpoints effectively.
Key Features and Endpoints
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or every 10 minutes. This feature is essential for traders who need the most current pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve past prices for analysis and reporting.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time Bid and Ask prices, providing insight into market liquidity and pricing dynamics.
- Convert Endpoint: Easily convert any amount from one currency to another, facilitating transactions and calculations across different metal values.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling trend analysis and forecasting.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, which is crucial for understanding market volatility.
- Carat Endpoint: Get information about gold rates by carat, allowing for precise calculations in jewelry and investment contexts.
- Lowest/Highest Price Endpoint: Query the API to find the lowest and highest prices for a specified date range, which can aid in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed price data for a specific time period, including open, high, low, and close prices, which are vital for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of market trends.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- 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 features multiple endpoints, each providing different functionalities tailored to various user needs.
- Supported Symbols Endpoint: Access a constantly updated endpoint that returns all available currencies and their specifications.
- Gold Price India Endpoint: Retrieve the latest gold price in India using a dedicated endpoint, which is particularly useful for regional investors.
- News Endpoint: Stay updated with the latest news articles related to various metals, helping you stay informed about market developments.
List of Symbols
Metals-API Supported Symbols page. This resource is invaluable for developers looking to integrate specific metal data into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1743735673,
"base": "USD",
"date": "2025-04-04",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
{
"success": true,
"timestamp": 1743649273,
"base": "USD",
"date": "2025-04-03",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-03-28",
"end_date": "2025-04-04",
"base": "USD",
"rates": {
"2025-03-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-03-30": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1743735673,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-03-28",
"end_date": "2025-04-04",
"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
{
"success": true,
"timestamp": 1743735673,
"base": "USD",
"date": "2025-04-04",
"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
{
"success": true,
"timestamp": 1743735673,
"base": "USD",
"date": "2025-04-04",
"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
Metals-API Documentation for detailed implementation guides, and refer to the Metals-API Supported Symbols page for a complete list of available metal symbols. The Metals-API Website also offers additional resources and insights into the world of precious metals.