Retrieve ProShares Ultra Gold (UGL) Historical Prices using this API

Retrieve ProShares Ultra Gold (UGL) 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. One of the most effective ways to retrieve historical prices for ProShares Ultra Gold (UGL) is through the Metals-API. This powerful API provides developers with the tools necessary to access real-time and historical data for various metals, including gold, silver, platinum, and palladium. In this blog post, we will explore the capabilities of Metals-API, focusing on how to retrieve historical prices for gold (XAU) and the innovative features that make this API a valuable resource for traders and developers alike.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset and a hedge against inflation. As digital transformation continues to reshape the financial landscape, the integration of technology in precious metals trading has become increasingly important. The rise of data analytics and market insights allows traders to make more informed decisions based on historical trends and real-time data. With the advent of digital asset solutions, gold trading is evolving, and the need for accurate price discovery is more critical than ever.
The Metals-API plays a pivotal role in this transformation by providing developers with access to real-time and historical data for gold and other precious metals. By leveraging this API, developers can build next-generation applications that empower traders to analyze market trends, optimize trading strategies, and enhance their decision-making processes.
API Description
The Metals-API is designed to provide comprehensive access to metals prices and currency conversion data. With its innovative features and capabilities, this API empowers developers to create applications that can analyze and visualize precious metals data in real time. The API supports a wide range of functionalities, including retrieving the latest rates, historical rates, and even bid and ask prices for various metals.
For more information on how to get started, you can refer to the Metals-API Documentation, which provides detailed guidance on using the API effectively. Additionally, the Metals-API Supported Symbols page offers a comprehensive list of all available metal symbols, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD).
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data retrieval needs. Here are some of the key features and their potential applications:
- 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. This feature is essential for traders who need to stay informed about the latest market movements.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the API call, you can retrieve historical prices for gold and other metals, allowing you to analyze trends over time.
- Bid And Ask Endpoint: This powerful feature enables you to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing you to convert any amount from one metal to another or to/from USD. This is particularly useful for traders who operate in multiple currencies.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice. It is ideal for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis with this endpoint. It provides valuable insights into market volatility and can help traders make informed decisions based on historical fluctuations.
- Carat Endpoint: Retrieve information about gold rates by carat using this endpoint. This feature is particularly useful for jewelers and those in the jewelry industry who need precise pricing based on carat weight.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date range. This information can help traders identify key support and resistance levels.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, allowing traders to analyze price movements throughout the trading day.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for traders who focus on industrial metals.
- API Key: Your API Key is essential for accessing the Metals-API. It is passed into the API base URL's access_key parameter, ensuring secure access to the data.
- API Response: The API delivers exchange rates relative to USD by default. All data is returned in a structured JSON format, making it easy to integrate into applications.
- Available Endpoints: The Metals-API comes with numerous endpoints, each providing different functionalities. Developers can explore these endpoints to find the ones that best suit their needs.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for traders operating in the Indian market.
- News Endpoint: Stay updated with the latest news articles related to various metals through the Metals-API news endpoint, which can help traders stay informed about market developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective data retrieval. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1748847683,
"base": "USD",
"date": "2025-06-02",
"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": 1748761283,
"base": "USD",
"date": "2025-06-01",
"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": "2025-05-26",
"end_date": "2025-06-02",
"base": "USD",
"rates": {
"2025-05-26": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-28": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-02": {
"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": 1748847683,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-26",
"end_date": "2025-06-02",
"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": 1748847683,
"base": "USD",
"date": "2025-06-02",
"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": 1748847683,
"base": "USD",
"date": "2025-06-02",
"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 is an invaluable tool for developers looking to retrieve historical prices for ProShares Ultra Gold (UGL) and other precious metals. With its extensive range of endpoints and capabilities, this API empowers traders to make informed decisions based on real-time and historical data. By leveraging the innovative features of the Metals-API, developers can create applications that enhance trading strategies, optimize market analysis, and ultimately drive better investment outcomes.
For more information on how to utilize the Metals-API effectively, be sure to check out the Metals-API Documentation and explore the Metals-API Supported Symbols page for a comprehensive list of available metal symbols. With the right tools and data at your fingertips, you can navigate the world of precious metals trading with confidence.