Learn to Retrieve ProShares UltraShort Gold (GLL) Historical Prices with this API
Learn to Retrieve ProShares UltraShort Gold (GLL) Historical Prices with this API
In the ever-evolving landscape of financial markets, the demand for accurate and timely data is paramount. For investors and traders interested in precious metals, particularly gold, the ability to retrieve historical prices is crucial for informed decision-making. This blog post will delve into the ProShares UltraShort Gold (GLL) and demonstrate how to effectively utilize the Metals-API to access historical prices and other valuable data related to gold.
Metals-API Information
The Metals-API is a powerful tool designed to provide real-time and historical data for various metals, including gold (XAU). This API is particularly beneficial for developers looking to integrate precious metals data into their applications, enabling them to create innovative solutions that leverage market insights and analytics.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and currency fluctuations. In recent years, the digital transformation in precious metals has opened new avenues for trading and investment. With the integration of data analytics and technology, traders can now access real-time market insights that empower them to make informed decisions.
The innovation in price discovery mechanisms has also been significant. Digital asset solutions are emerging, allowing investors to trade gold in various forms, including ETFs like GLL. This evolution highlights the importance of having access to accurate historical pricing data, which can be easily retrieved using the Metals-API.
API Description
The Metals-API is designed to empower developers by providing a comprehensive suite of endpoints that deliver real-time and historical metals data. With a focus on innovation and technological advancement, this API enables the creation of next-generation applications that can analyze market trends and provide actionable insights.
For more information, you can refer to the Metals-API Documentation, which outlines the various features and capabilities of the API.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data updated every 60 minutes or even more frequently. This feature is essential for traders who need to stay updated with the latest market movements.
- Historical Rates Endpoint: This endpoint allows users to access historical rates for most currencies dating back to 2019. By appending a specific date, developers can retrieve past pricing data, which is crucial for analyzing trends and making predictions.
- Bid And Ask Endpoint: This powerful feature enables 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 feature, allowing users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates, making it easier to analyze price movements over time.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is useful for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, which is beneficial for those interested in industrial metals.
- API Key: Users must pass their unique API key into the API base URL's access_key parameter to authenticate their requests.
- API Response: The API delivers exchange rates relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API comes with 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them 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
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1769905203,
"base": "USD",
"date": "2026-02-01",
"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": 1769818803,
"base": "USD",
"date": "2026-01-31",
"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-01-25",
"end_date": "2026-02-01",
"base": "USD",
"rates": {
"2026-01-25": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-27": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-01": {
"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": 1769905203,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-25",
"end_date": "2026-02-01",
"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": 1769905203,
"base": "USD",
"date": "2026-02-01",
"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": 1769905203,
"base": "USD",
"date": "2026-02-01",
"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 flexible solution for accessing historical prices and real-time data for precious metals like gold. By leveraging the various endpoints offered by the API, developers can create applications that not only retrieve data but also analyze and interpret it to gain valuable market insights.
Whether you are a trader looking to track price movements, a developer building financial applications, or an analyst seeking to understand market trends, the Metals-API is an invaluable resource. With its comprehensive documentation and extensive features, it empowers users to harness the power of data in the precious metals market.
For further exploration, consider visiting the Metals-API Documentation for detailed information on each endpoint, or check out the Metals-API Supported Symbols page to familiarize yourself with the available metal symbols.
As the financial landscape continues to evolve, staying informed and equipped with the right tools will be essential for success. Embrace the digital transformation in precious metals trading and leverage the capabilities of the Metals-API to enhance your trading strategies and decision-making processes.