Retrieve ProShares Ultra Gold (UGL) prices with our API integration

Metals-API 5 min read
Retrieve ProShares Ultra Gold (UGL) prices with our API integration

Introduction

In the world of finance, the ability to retrieve accurate and timely data is crucial, especially when it comes to precious metals like gold. The ProShares Ultra Gold (UGL) is a popular exchange-traded fund (ETF) that aims to provide investors with leveraged exposure to gold prices. To effectively track and analyze UGL prices, developers can leverage the Metals-API, a powerful tool that provides real-time and historical data on various metals, including gold (XAU). This blog post will explore the capabilities of the Metals-API, its endpoints, and how it can be integrated into applications to enhance trading strategies and market insights.

Metals-API Information

About Gold (XAU)

Gold has long been regarded as a safe haven asset, especially during times of economic uncertainty. Its value is influenced by various factors, including geopolitical events, inflation rates, and currency fluctuations. In recent years, the digital transformation in precious metals trading has opened up new avenues for investors and developers alike. By utilizing data analytics and market insights, traders can make informed decisions based on real-time data.

The integration of technology in trading has revolutionized how investors access and interpret market information. With the Metals-API, developers can build applications that provide innovative solutions for price discovery and trading strategies. The API's capabilities allow for seamless integration of real-time metals data, empowering developers to create next-generation applications that cater to the evolving needs of the market.

API Description

The Metals-API is designed to provide developers with comprehensive access to real-time and historical data on various metals. Its innovative features enable users to build applications that can track price movements, analyze trends, and make informed trading decisions. The API supports multiple endpoints, each offering unique functionalities that cater to different use cases.

One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated frequently based on the user's subscription plan. This ensures that developers have access to the most current information, which is vital for making timely trading decisions. Additionally, the API offers historical data dating back to 2019, allowing users to analyze trends over time and make predictions based on past performance.

For developers looking to implement currency conversion, the Metals-API provides a dedicated endpoint that allows for seamless conversion between different metals and fiat currencies. This feature is particularly useful for traders who operate in multiple markets and need to quickly assess the value of their assets in different currencies.

Key Features and Endpoints

The Metals-API offers a variety of endpoints that cater to different data needs. Here are some of the key features:

  • Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. For example, a typical response might look like this:
  • {
    "success": true,
    "timestamp": 1760400238,
    "base": "USD",
    "date": "2025-10-14",
    "rates": {
    "XAU": 0.000482,
    "XAG": 0.03815,
    "XPT": 0.000912,
    "XPD": 0.000744
    },
    "unit": "per troy ounce"
    }
  • Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. This is particularly useful for analyzing trends over time. A sample response might look like this:
  • {
    "success": true,
    "timestamp": 1760313838,
    "base": "USD",
    "date": "2025-10-13",
    "rates": {
    "XAU": 0.000485,
    "XAG": 0.03825
    },
    "unit": "per troy ounce"
    }
  • Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, enabling traders to make informed decisions based on current market conditions. An example response is as follows:
  • {
    "success": true,
    "timestamp": 1760400238,
    "base": "USD",
    "date": "2025-10-14",
    "rates": {
    "XAU": {
    "bid": 0.000481,
    "ask": 0.000483,
    "spread": 2.0e-6
    }
    },
    "unit": "per troy ounce"
    }
  • Convert Endpoint: This endpoint allows users to convert any amount from one metal to another or to/from USD. For example, converting 1000 USD to gold might yield:
  • {
    "success": true,
    "query": {
    "from": "USD",
    "to": "XAU",
    "amount": 1000
    },
    "info": {
    "timestamp": 1760400238,
    "rate": 0.000482
    },
    "result": 0.482,
    "unit": "troy ounces"
    }
  • Time-Series Endpoint: This feature allows users to query the API for daily historical rates between two dates of their choice, providing valuable insights into price movements over time. A typical response might look like this:
  • {
    "success": true,
    "timeseries": true,
    "start_date": "2025-10-07",
    "end_date": "2025-10-14",
    "base": "USD",
    "rates": {
    "2025-10-07": {
    "XAU": 0.000485
    },
    "2025-10-14": {
    "XAU": 0.000482
    }
    },
    "unit": "per troy ounce"
    }
  • Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, which is essential for traders looking to understand market volatility. An example response might look like this:
  • {
    "success": true,
    "fluctuation": true,
    "start_date": "2025-10-07",
    "end_date": "2025-10-14",
    "base": "USD",
    "rates": {
    "XAU": {
    "start_rate": 0.000485,
    "end_rate": 0.000482,
    "change": -3.0e-6,
    "change_pct": -0.62
    }
    },
    "unit": "per troy ounce"
    }
  • Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows users to query the API for the open, high, low, and close prices for a specific time period, which is crucial for technical analysis. A sample response is:
  • {
    "success": true,
    "timestamp": 1760400238,
    "base": "USD",
    "date": "2025-10-14",
    "rates": {
    "XAU": {
    "open": 0.000485,
    "high": 0.000487,
    "low": 0.000481,
    "close": 0.000482
    }
    },
    "unit": "per troy ounce"
    }
  • Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing users to analyze trends in the London Metal Exchange.
  • API Key: Each user is assigned a unique API key that must be included in the API requests to authenticate and authorize access to the data.
  • API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
  • Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals supported by the API. For a complete list, refer to the Metals-API Supported Symbols.
  • Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to a specific market need.
  • News Endpoint: Users can access the latest news articles related to various metals, providing context and insights into market movements.

Conclusion

The Metals-API is a powerful tool for developers looking to integrate real-time and historical data on precious metals into their applications. With its extensive range of endpoints, including the latest rates, historical data, and conversion capabilities, the API empowers users to make informed trading decisions based on accurate and timely information. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance trading strategies and provide valuable market insights.

For more detailed information on how to implement the Metals-API in your applications, be sure to check out the Metals-API Documentation. Whether you're looking to track gold prices, analyze market trends, or develop advanced trading applications, the Metals-API provides the tools you need to succeed in the dynamic world of precious metals trading.