Collect VanEck Merk Gold Trust (OUNZ) Historical Prices through this API

Collect VanEck Merk Gold Trust (OUNZ) Historical Prices through this API
Metals-API. This blog post delves into the intricacies of retrieving historical prices for OUNZ using the Metals-API, while also exploring the broader implications of technology integration in the precious metals market.
About Gold (XAU)
Metals-API Overview
Metals-API is a robust JSON API that offers comprehensive access to precious metals prices, including historical data, real-time rates, and conversion capabilities. This API empowers developers to create applications that can analyze market trends, track price fluctuations, and provide valuable insights into the precious metals market.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rates for all available metals, including gold (XAU). The response includes the base currency, date, and rates for various metals.
- Historical Rates Endpoint: Investors can access historical rates dating back to 2019. By appending a specific date to the API request, users can retrieve past prices for OUNZ, enabling them to analyze trends over time.
- Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insight into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion feature, allowing users to convert amounts between different metals or to/from USD. This is particularly useful for traders looking to assess the value of their holdings in various currencies.
- Time-Series Endpoint: This endpoint enables users to query daily historical rates between two specified dates, making it easier to analyze price movements over specific periods.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, catering to jewelers and investors interested in specific gold purity levels.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for a given metal over a specified period, aiding in investment decision-making.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides detailed OHLC data for a specific time period, allowing traders to analyze price movements comprehensively.
- Historical LME Endpoint: For those interested in LME symbols, this endpoint provides historical rates dating back to 2008, offering a wealth of data for analysis.
- API Key: Each user is assigned a unique API key, which is essential for accessing the API's features securely.
- API Response: The Metals-API delivers exchange rates relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The API features a constantly updated list of available currencies, enabling users to stay informed about supported symbols.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to regional market needs.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1754355777,
"base": "USD",
"date": "2025-08-05",
"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
{
"success": true,
"timestamp": 1754269377,
"base": "USD",
"date": "2025-08-04",
"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-07-29",
"end_date": "2025-08-05",
"base": "USD",
"rates": {
"2025-07-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-07-31": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-08-05": {
"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": 1754355777,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-07-29",
"end_date": "2025-08-05",
"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) Price Endpoint
{
"success": true,
"timestamp": 1754355777,
"base": "USD",
"date": "2025-08-05",
"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": 1754355777,
"base": "USD",
"date": "2025-08-05",
"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"
}
Common Developer Questions
- How do I authenticate my API requests? Each request must include your unique API key as a parameter in the URL. This ensures secure access to the API's features.
- What are the rate limits for API requests? Rate limits vary based on your subscription plan. It's essential to review the documentation to understand your specific limits and avoid throttling.
- How do I handle errors in API responses? The API provides error codes and messages in the response. Developers should implement error handling strategies to manage these scenarios effectively.
Practical Use Cases and Integration Strategies
- Real-Time Trading Platforms: Developers can build platforms that utilize the latest rates endpoint to provide users with real-time pricing information, enabling them to make swift trading decisions.
- Historical Data Analysis Tools: By leveraging the historical rates endpoint, developers can create analytical tools that allow users to visualize price trends over time, aiding in investment strategy formulation.
- Portfolio Management Applications: The convert endpoint can be integrated into portfolio management tools, allowing users to assess the value of their holdings in different currencies or metals.
Conclusion
Metals-API, developers can access a wealth of historical price data and real-time market insights, empowering them to build sophisticated trading applications. The API's innovative features, such as the latest rates, historical rates, and fluctuation endpoints, provide invaluable tools for analyzing market trends and making informed investment decisions.
Metals-API Documentation and explore the comprehensive Metals-API Supported Symbols list to get started on your journey into the world of precious metals trading.