Use this API to obtain ProShares Ultra
Introduction
In the ever-evolving landscape of financial technology, the ability to access real-time data is paramount for developers and businesses alike. One such powerful tool is the Metals-API, which provides comprehensive access to metal market data, including precious metals like Gold (XAU), Silver (XAG), Platinum (XPT), and Palladium (XPD). This blog post will delve into the capabilities of the Metals-API, exploring its various endpoints, features, and how developers can leverage this technology to build innovative applications.
Understanding the Metals-API
The Metals-API is a robust JSON API designed to deliver real-time and historical data on metal prices and currency conversions. It empowers developers to create applications that require up-to-date information on metal markets, enabling them to make informed decisions based on accurate data. The API is particularly beneficial for financial analysts, traders, and businesses involved in the buying and selling of metals.
API Description
The Metals-API offers a wide range of functionalities, allowing users to access real-time exchange rates, historical data, and various analytical metrics. With the ability to retrieve data at different intervals and formats, the API stands out as a valuable resource for developers looking to integrate metal pricing into their applications. The API supports multiple endpoints, each tailored to specific data retrieval needs, making it a versatile tool for any developer.
Key Features of the Metals-API
The Metals-API boasts several key features that enhance its usability and functionality:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This ensures that users have access to the most current market prices.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the API for past rates, which is essential for trend analysis and forecasting.
- Bid and Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for various metals, providing insights into market liquidity and pricing strategies.
- Convert Endpoint: The API includes a currency conversion feature that enables users to convert any amount from one metal to another or to/from USD. This is particularly useful for businesses operating in multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two chosen dates, facilitating 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, allowing users to track volatility and make informed trading decisions.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is essential for jewelers and businesses dealing in gold jewelry.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest prices for a specified date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access open, high, low, and close prices for a specific date, which is crucial for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering insights into long-term price trends.
- API Key: Each user is assigned a unique API key, which is required for authentication and authorization when accessing the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The API includes 14 endpoints, each providing different functionalities, making it a comprehensive solution for metal pricing data.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metal symbols, ensuring users have access to the latest data.
- 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
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various endpoints, including their expected responses.
Latest Rates Endpoint
The Latest Rates Endpoint allows users to get real-time exchange rates for all available metals. Here’s an example response:
{
"success": true,
"timestamp": 1774138219,
"base": "USD",
"date": "2026-03-22",
"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 relative to USD, with the unit specified as "per troy ounce."
Historical Rates Endpoint
Accessing historical exchange rates is essential for trend analysis. Here’s an example response for a historical rates query:
{
"success": true,
"timestamp": 1774051819,
"base": "USD",
"date": "2026-03-21",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for the specified date, allowing developers to analyze past market conditions.
Time-Series Endpoint
The Time-Series Endpoint enables users to retrieve exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-03-15",
"end_date": "2026-03-22",
"base": "USD",
"rates": {
"2026-03-15": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-17": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-22": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for the specified date range, allowing for detailed analysis of price trends over time.
Convert Endpoint
The Convert Endpoint allows users to convert amounts between different metals or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1774138219,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of gold (XAU), providing a clear conversion result.
Fluctuation Endpoint
The Fluctuation Endpoint tracks rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-15",
"end_date": "2026-03-22",
"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 response provides detailed information about how metal prices have changed over the specified period, including both absolute and percentage changes.
OHLC (Open/High/Low/Close) Price Endpoint
The OHLC Price Endpoint provides open, high, low, and close prices for a specific date. Here’s an example response:
{
"success": true,
"timestamp": 1774138219,
"base": "USD",
"date": "2026-03-22",
"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 movement for each metal throughout the day, which is essential for traders and analysts.
Bid/Ask Endpoint
The Bid/Ask Endpoint provides current bid and ask prices for metals. Here’s an example response:
{
"success": true,
"timestamp": 1774138219,
"base": "USD",
"date": "2026-03-22",
"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 response provides the current bid and ask prices, along with the spread, which is crucial for traders looking to execute orders efficiently.
Conclusion
The Metals-API is an invaluable resource for developers seeking to integrate real-time metal pricing data into their applications. With its extensive range of endpoints and features, it empowers users to access the information they need to make informed decisions in the fast-paced world of metal trading. By leveraging the capabilities of the Metals-API, developers can create innovative applications that provide users with real-time insights into market trends and pricing.
For more detailed information on how to implement the Metals-API in your projects, refer to the Metals-API Documentation. Additionally, explore the Metals-API Supported Symbols page to familiarize yourself with the various metal symbols available. With the right tools and knowledge, you can harness the power of real-time metals data to drive your applications forward.