Get ProShares Ultra Gold (UGL) Historical Prices with Metals-API

Get ProShares Ultra Gold (UGL) Historical Prices with Metals-API
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed investment decisions. One of the most sought-after assets is gold, represented by the symbol XAU. For traders and developers looking to integrate gold price data into their applications, the Metals-API offers a powerful solution to retrieve historical prices and real-time data. This blog post will explore how to effectively use the Metals-API to access historical prices for ProShares Ultra Gold (UGL) and delve into the innovative features that make this API a valuable tool for developers.
Metals-API Information
The Metals-API is designed to provide developers with a comprehensive suite of tools for accessing metals prices, including gold, silver, platinum, and palladium. With its user-friendly interface and robust capabilities, the API empowers developers to build next-generation applications that leverage real-time and historical data. The API supports a variety of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019.
About Gold (XAU)
Gold has long been considered a safe haven asset, especially during times of economic uncertainty. Its value is influenced by various factors, including market demand, geopolitical events, and currency fluctuations. As the digital transformation continues to reshape the financial landscape, the integration of data analytics and technology in precious metals trading is becoming increasingly important. The Metals-API plays a pivotal role in this transformation by providing developers with access to real-time market insights and historical data.
Through the use of advanced data analytics, traders can gain deeper insights into market trends and make more informed decisions. The API's ability to deliver real-time data enables developers to create applications that can react to market changes instantaneously, enhancing the trading experience. Furthermore, the innovation in price discovery facilitated by the Metals-API allows for more accurate valuations of precious metals, which is essential for both individual investors and institutional traders.
API Description
The Metals-API is a JSON-based API that provides access to a wide range of functionalities related to metals pricing. It is designed to be intuitive and easy to use, allowing developers to quickly integrate it into their applications. The API offers endpoints for retrieving the latest rates, historical prices, bid and ask prices, and much more. Each endpoint is equipped with detailed documentation to assist developers in understanding how to utilize the API effectively.
For detailed information on how to get started, refer to the Metals-API Documentation. This resource provides comprehensive guidance on authentication, endpoint usage, and response handling.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints that cater to different data retrieval needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This feature is essential for traders who need to stay updated on market fluctuations.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the endpoint, developers can retrieve historical prices for gold and other metals, making it easier to analyze past performance.
- Bid And Ask Endpoint: This powerful feature allows users 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, enabling users to convert any amount from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice, allowing for in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how metal prices fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is essential for jewelers and those in the jewelry industry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date, providing insights into price extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows users to get the open, high, low, and close prices for a specific date, which is critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for those trading industrial metals.
- API Key: Each user is provided with a unique API key that must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metal symbols, ensuring developers have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for traders in the Indian market.
- News Endpoint: Stay informed with the latest news articles related to various metals, helping traders make informed decisions based on current events.
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 understand the various metals available for trading.
API Endpoint Examples and Responses
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1742526078,
"base": "USD",
"date": "2025-03-21",
"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": 1742439678,
"base": "USD",
"date": "2025-03-20",
"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-03-14",
"end_date": "2025-03-21",
"base": "USD",
"rates": {
"2025-03-14": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-03-16": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-03-21": {
"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": 1742526078,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-03-14",
"end_date": "2025-03-21",
"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": 1742526078,
"base": "USD",
"date": "2025-03-21",
"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": 1742526078,
"base": "USD",
"date": "2025-03-21",
"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 and versatile solution for accessing historical prices and real-time data for precious metals like gold. With its array of endpoints, developers can easily integrate valuable data into their applications, enabling them to make informed trading decisions. The API's innovative features, such as real-time rates, historical data access, and conversion capabilities, empower developers to create applications that meet the evolving needs of the market.
For those looking to delve deeper into the capabilities of the Metals-API, the Metals-API Documentation is an essential resource. It offers detailed guidance on how to utilize each endpoint effectively, ensuring that developers can maximize the potential of this powerful tool. Additionally, the Metals-API Supported Symbols page provides a comprehensive list of available symbols, making it easier for developers to find the data they need.
As the digital landscape continues to evolve, the integration of technology in precious metals trading will only become more critical. By leveraging the capabilities of the Metals-API, developers can stay ahead of the curve and create innovative solutions that enhance the trading experience.