Step-by-Step Guide to Get VanEck Merk Gold Trust (OUNZ) Historical Prices using this API
Step-by-Step Guide to Get VanEck Merk Gold Trust (OUNZ) Historical Prices using this API
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. This guide will walk you through the process of obtaining historical prices for the VanEck Merk Gold Trust (OUNZ) using the Metals-API. The Metals-API is a powerful tool that provides real-time and historical data for various metals, including gold, silver, platinum, and palladium. By leveraging this API, developers can create applications that offer insights into market trends, price fluctuations, and more.
Metals-API Information
About Gold (XAU)
Gold has long been considered a safe-haven asset, especially during times of economic uncertainty. With the rise of digital transformation in precious metals trading, the integration of data analytics and technology has revolutionized how investors interact with the market. The Metals-API plays a pivotal role in this transformation by providing developers with the tools needed to access real-time data and historical insights.
By utilizing the Metals-API, developers can harness the power of data analytics to gain market insights, innovate in price discovery, and integrate digital asset solutions into their trading platforms. This API not only empowers developers to build next-generation applications but also enhances the overall trading experience for users.
API Description
The Metals-API is designed to provide comprehensive access to metals prices and currency conversion data. It offers a wide range of endpoints that allow developers to retrieve real-time rates, historical prices, and other valuable information. The API is built with innovation and technological advancement in mind, making it a transformative tool for anyone involved in the precious metals market.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on how to use the API effectively.
Key Features and Endpoints
The Metals-API offers several key features that are essential for accessing and analyzing metals data:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on your plan, you can receive updates every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your query. This feature is crucial for analyzing past performance and trends.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing you to gauge market sentiment and make informed trading decisions.
- Convert Endpoint: Easily convert any amount from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling in-depth analysis of price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers interested in gold jewelry.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for a specified date, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for a specific date, which is essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive 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, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 endpoints, each offering different functionalities to cater to various user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you 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
Understanding the API responses is crucial for effective integration. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1777421730,
"base": "USD",
"date": "2026-04-29",
"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": 1777335330,
"base": "USD",
"date": "2026-04-28",
"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": "2026-04-22",
"end_date": "2026-04-29",
"base": "USD",
"rates": {
"2026-04-22": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-24": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-29": {
"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": 1777421730,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-22",
"end_date": "2026-04-29",
"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": 1777421730,
"base": "USD",
"date": "2026-04-29",
"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": 1777421730,
"base": "USD",
"date": "2026-04-29",
"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 Metals-API provides a robust framework for accessing historical prices and real-time data for the VanEck Merk Gold Trust (OUNZ) and other precious metals. By utilizing the various endpoints available, developers can create applications that offer valuable insights into market trends and price fluctuations. The API's comprehensive documentation and support for multiple symbols make it an essential tool for anyone involved in metals trading.
For further exploration, consider diving into the Metals-API Documentation to understand the full capabilities of the API. Additionally, keep an eye on the Metals-API Supported Symbols page for updates on available metals and currencies.
By leveraging the power of the Metals-API, you can enhance your trading strategies and make informed decisions based on accurate and timely data. Whether you're a seasoned trader or a developer looking to integrate metals data into your applications, the Metals-API is your gateway to the world of precious metals.