Retrieve VanEck Merk Gold Trust (OUNZ) Historical Prices from Public APIs
Retrieve VanEck Merk Gold Trust (OUNZ) Historical Prices from Public APIs
In the ever-evolving landscape of financial technology, the demand for real-time and historical data on precious metals has surged. One of the most sought-after assets in this domain is Gold, represented by the symbol XAU. For developers and traders alike, accessing historical prices for Gold, such as those for the VanEck Merk Gold Trust (OUNZ), is crucial for informed decision-making. This blog post will delve into how to retrieve historical prices using the Metals-API, a powerful tool designed for seamless integration of metals data into applications.
Metals-API Information
The Metals-API is a comprehensive JSON API that provides real-time and historical data on various metals, including Gold, Silver, Platinum, and Palladium. It empowers developers to build next-generation applications by offering a suite of endpoints that cater to different data needs. With the rise of digital transformation in the precious metals market, the Metals-API stands out as a beacon of innovation, enabling users to harness data analytics for market insights and technology integration in trading.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset, especially during times of economic uncertainty. Its value is not only derived from its physical properties but also from its historical significance as a store of value. In recent years, the digital transformation of precious metals has led to the emergence of innovative solutions for price discovery and trading. The integration of technology in this sector has enabled traders to access real-time data, analyze trends, and make informed decisions based on comprehensive market insights.
The Metals-API plays a pivotal role in this transformation by providing developers with the tools needed to access and manipulate data related to Gold and other metals. By leveraging the API, developers can create applications that offer users insights into price fluctuations, historical trends, and even predictive analytics based on past performance.
API Description
The Metals-API is designed to be user-friendly while offering robust capabilities. It provides access to a variety of endpoints that cater to different data requirements. Whether you need the latest rates, historical data, or specific price points, the Metals-API has you covered. The API is built with a focus on innovation and technological advancement, allowing developers to create applications that can respond to market changes in real-time.
For detailed information on how to implement the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on each endpoint, including parameters, expected responses, and usage examples.
Key Features and Endpoints
The Metals-API boasts a range of endpoints that facilitate various functionalities. Hereβs an overview of some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes or more frequently, depending on your subscription plan. It allows users to access the most current prices for Gold and other metals.
- Historical Rates Endpoint: Users can query historical rates dating back to 2019 by appending a specific date to the API request. This feature is essential for analyzing past performance and trends.
- Bid And Ask Endpoint: This powerful feature enables 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 endpoint, allowing users to convert amounts between different metals or to/from USD, facilitating seamless transactions.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve Gold rates by carat, catering to specific market needs.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is crucial for traders looking to optimize their buying and selling strategies.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides detailed OHLC data for a specific time period, allowing for in-depth market analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for users interested in long-term trends.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: With 14 different endpoints, the Metals-API offers a comprehensive suite of functionalities for various use cases.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users 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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. Below are examples of various endpoint responses to illustrate how the API functions:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1768349875,
"base": "USD",
"date": "2026-01-14",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
This response indicates a successful query for the latest rates, with the base currency set to USD. The rates for Gold (XAU), Silver (XAG), Platinum (XPT), and Palladium (XPD) are provided per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1768263475,
"base": "USD",
"date": "2026-01-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows a successful response for historical rates, allowing users to analyze past performance for Gold and other metals.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-07",
"end_date": "2026-01-14",
"base": "USD",
"rates": {
"2026-01-07": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-09": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-14": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides daily rates for the specified period, enabling users to track price movements over time.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1768349875,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates the conversion of USD to Gold (XAU), showing the amount in troy ounces based on the current rate.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-07",
"end_date": "2026-01-14",
"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"
}
This example illustrates how the fluctuation endpoint tracks changes in metal prices over a specified period, providing valuable insights into market dynamics.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1768349875,
"base": "USD",
"date": "2026-01-14",
"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"
}
The OHLC response provides a comprehensive view of the price movement for a specific date, essential for traders looking to analyze market trends.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1768349875,
"base": "USD",
"date": "2026-01-14",
"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"
}
This response shows the current bid and ask prices for Gold and other metals, providing insights into market liquidity and pricing dynamics.
Conclusion
In conclusion, the Metals-API offers a robust and comprehensive solution for developers seeking to access historical prices and real-time data for precious metals like Gold. By leveraging the various endpoints, developers can create applications that provide valuable insights into market trends, price fluctuations, and trading strategies. The ability to retrieve historical data, analyze trends, and convert between different metals enhances the decision-making process for traders and investors alike.
For further exploration of the API's capabilities, developers are encouraged to visit the Metals-API Documentation and familiarize themselves with the extensive features available. Additionally, the Metals-API Supported Symbols page provides a complete list of available metals, ensuring users have access to the latest information.
As the market continues to evolve, the integration of technology in trading and data analytics will play a crucial role in shaping the future of precious metals. The Metals-API stands at the forefront of this transformation, empowering developers to build innovative solutions that drive market insights and enhance trading strategies.