The Easiest Way to Get Platinum Ask (XPT-ASK) Historical Rates in API Documentation
The Easiest Way to Get Platinum Ask (XPT-ASK) Historical Rates in API Documentation
In the world of financial technology, having access to real-time and historical data is crucial for developers and businesses alike. The Metals-API provides a robust solution for obtaining historical rates for precious metals, including Platinum (XPT). This blog post will guide you through the process of retrieving Gold (XAU) historical prices using the Metals-API, detailing the various endpoints, parameters, and data formats involved. By the end of this article, you will have a comprehensive understanding of how to leverage this powerful API to enhance your applications.
About Platinum (XPT)
Platinum is not just a precious metal; it plays a significant role in various industries, particularly in green technology applications and sustainable innovation. As the world shifts towards clean energy solutions, the demand for Platinum is expected to rise. Its unique properties make it an essential component in catalytic converters, which help reduce harmful emissions from vehicles. Furthermore, the integration of smart technology in industries is driving the need for real-time data on metal prices, including Platinum.
The Metals-API is designed to empower developers by providing them with the tools necessary to build next-generation applications that can track and analyze metal prices in real-time. This API offers a wealth of information, enabling users to make informed decisions based on accurate and timely data.
API Description
The Metals-API is a powerful tool that provides access to real-time and historical data for various metals. With its innovative approach, the API allows developers to integrate metal pricing data into their applications seamlessly. The API supports multiple endpoints, each designed to cater to specific data retrieval needs. Whether you are looking for the latest rates, historical data, or conversion capabilities, the Metals-API has you covered.
For more information, you can visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on using the API.
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:
- 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.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. You can query the Metals-API for historical rates by appending a date in the format YYYY-MM-DD.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing you to understand market dynamics better.
- Convert Endpoint: This endpoint enables you to convert any amount from one currency to another, facilitating easy transactions.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into price trends over time.
- Fluctuation Endpoint: Get information about how currencies fluctuate on a day-to-day basis, helping you track market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which is essential for jewelers and investors alike.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of price movements.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates are delivered relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 endpoints, each providing distinct functionalities.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
List of Symbols
The 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 effective implementation. Below are examples of various endpoints, including their expected responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the latest rates endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1784516897,
"base": "USD",
"date": "2026-07-20",
"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"
}
This response indicates the success of the request, the timestamp of the data, the base currency (USD), the date of the rates, and the rates for various metals.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999 using the historical rates endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1784430497,
"base": "USD",
"date": "2026-07-19",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for the specified date, allowing developers to analyze past price movements.
Time-series Endpoint
The time-series endpoint allows you to get exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-13",
"end_date": "2026-07-20",
"base": "USD",
"rates": {
"2026-07-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response shows the exchange rates for the specified dates, allowing for trend analysis over time.
Convert Endpoint
The convert endpoint enables you to convert any amount from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1784516897,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates the success of the conversion, the original query, the conversion rate, and the result in troy ounces.
Fluctuation Endpoint
The fluctuation endpoint allows you to track rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-13",
"end_date": "2026-07-20",
"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 insights into how the rates have changed over the specified period, including both absolute and percentage changes.
OHLC (Open/High/Low/Close) Endpoint
To get OHLC data for a specific time period, you can use the OHLC endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1784516897,
"base": "USD",
"date": "2026-07-20",
"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 the opening, highest, lowest, and closing prices for the specified date, which is essential for traders and analysts.
Bid/Ask Endpoint
To get current bid and ask prices for metals, you can use the bid/ask endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1784516897,
"base": "USD",
"date": "2026-07-20",
"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 make informed decisions.
Conclusion
In conclusion, the Metals-API offers a comprehensive solution for developers seeking to access real-time and historical data for precious metals, including Platinum (XPT) and Gold (XAU). By utilizing the various endpoints provided by the API, developers can create applications that analyze market trends, track price fluctuations, and facilitate currency conversions.
With features like the latest rates, historical rates, and fluctuation tracking, the Metals-API empowers users to make data-driven decisions in the ever-evolving financial landscape. For more information on how to implement these features, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals.
By integrating the Metals-API into your applications, you can harness the power of real-time data and enhance your financial analysis capabilities. Start exploring today and unlock the potential of precious metals data!