Fetch ProShares Ultra Gold (UGL) Historical Prices through this API

Introduction
In the ever-evolving landscape of financial markets, the demand for precise and timely data has never been greater. For investors and traders focused on precious metals, particularly Gold (XAU), accessing historical prices is crucial for making informed decisions. The Metals-API provides a powerful solution for fetching historical prices and real-time data, enabling developers to create innovative applications that leverage this information. In this blog post, we will explore how to effectively utilize the Metals-API to fetch historical prices for Gold (XAU) and discuss the broader implications of digital transformation in the precious metals market.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and economic uncertainty. As we witness a digital transformation in the precious metals market, the integration of technology and data analytics is reshaping how investors interact with Gold. The rise of digital asset solutions and innovative price discovery mechanisms is empowering traders to make data-driven decisions.
With the advent of advanced data analytics, market insights derived from historical price trends can provide a competitive edge. The Metals-API plays a pivotal role in this transformation, offering developers the tools necessary to access and analyze real-time and historical data for Gold and other precious metals.
API Description
The Metals-API is a comprehensive JSON API that provides access to a wide range of metal prices, including Gold (XAU). It empowers developers to build next-generation applications by offering real-time data, historical rates, and various endpoints tailored to specific needs. The API's capabilities extend beyond mere price retrieval; it facilitates advanced analytics, allowing users to track fluctuations, convert currencies, and access detailed market insights.
For more information on how to get started, refer to the Metals-API Documentation, which provides detailed guidance on using the API effectively.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different requirements. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or 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 the API request, users can retrieve historical data for analysis and decision-making.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD, facilitating seamless transactions.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice, allowing for comprehensive trend analysis.
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Retrieve information about Gold rates by carat, which is particularly useful for jewelers and consumers interested in specific gold purity levels.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices within a specified timeframe, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for a specific time period, providing a comprehensive view of price movements.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for those tracking industrial metal prices.
- API Key: Each user is assigned a unique API key, which must be included in the API requests to authenticate and authorize access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India, catering to a specific regional market.
- News Endpoint: Access 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.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. 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": 1752472821,
"base": "USD",
"date": "2025-07-14",
"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"
}
In this response, the "rates" object contains the current exchange rates for various metals, with Gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1752386421,
"base": "USD",
"date": "2025-07-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for Gold (XAU) and other metals, allowing users to analyze price trends over time.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-07-07",
"end_date": "2025-07-14",
"base": "USD",
"rates": {
"2025-07-07": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-07-09": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-14": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This time-series response allows users to track the price movements of Gold (XAU) over a specified period, providing valuable insights into market trends.
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": 1752472821,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates how to convert a specified amount of USD into Gold (XAU), providing the equivalent value in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-07-07",
"end_date": "2025-07-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 fluctuation response provides insights into how Gold (XAU) and other metals have changed over a specified period, highlighting both absolute and percentage changes.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1752472821,
"base": "USD",
"date": "2025-07-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"
}
This response provides a comprehensive view of the price movements for Gold (XAU) and other metals, including the opening, highest, lowest, and closing prices for a specific date.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1752472821,
"base": "USD",
"date": "2025-07-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 bid/ask response provides crucial information for traders, allowing them to assess market conditions and make informed trading decisions.
Conclusion
The Metals-API is a transformative tool for developers and traders in the precious metals market, particularly for Gold (XAU). By leveraging its extensive features and endpoints, users can access real-time and historical data, enabling them to make informed decisions based on accurate market insights. The integration of technology and data analytics in trading is paving the way for a new era of investment strategies, where data-driven decisions are paramount.
For those looking to dive deeper into the capabilities of the Metals-API, the Metals-API Documentation provides comprehensive guidance on implementation and usage. Additionally, the Metals-API Supported Symbols page offers a complete list of available symbols, ensuring users have access to the latest information. As the market continues to evolve, staying informed and utilizing advanced tools like the Metals-API will be essential for success in the precious metals trading landscape.