Implement this API to Get Platinum Continuous Contract (PL00) Historical Prices

Implement this API to Get Platinum Continuous Contract (PL00) Historical Prices
In today's fast-paced financial landscape, accessing accurate and timely data is crucial for developers and analysts alike. One of the most sought-after commodities in the precious metals market is platinum, represented by the symbol XPT. This blog post will delve into how to retrieve historical prices for platinum using the Metals-API. We will explore the API's capabilities, its innovative features, and how it can empower developers to create next-generation applications that leverage real-time metals data.
About Platinum (XPT)
Platinum is a rare and precious metal that has gained significant attention due to its applications in various industries, including automotive, electronics, and jewelry. As the world shifts towards green technology and sustainable innovation, platinum's role in clean energy solutions, such as fuel cells and catalytic converters, becomes increasingly vital. The integration of smart technology and digital transformation in these sectors further emphasizes the need for accurate pricing data, making the Metals-API an essential tool for developers.
With the Metals-API, developers can access a wealth of information about platinum prices, allowing them to build applications that can analyze trends, forecast prices, and make informed decisions. The API provides real-time and historical data, enabling users to track fluctuations and understand market dynamics.
API Description
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical prices of various metals, including platinum. This API is built with innovation in mind, offering a range of endpoints that cater to different data needs. By leveraging the Metals-API, developers can create applications that not only display current prices but also analyze historical trends and fluctuations.
One of the standout features of the Metals-API is its ability to deliver data in a user-friendly JSON format. This makes it easy for developers to integrate the API into their applications, regardless of the programming language they are using. The API is designed to be scalable, allowing it to handle large volumes of requests without compromising performance.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that provide different functionalities, each designed to meet specific data needs. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This is crucial for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates for platinum dating back to 2019. By appending a date to the API request, developers can retrieve past prices, which is essential for trend analysis and forecasting.
- Bid and Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for platinum, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion feature, allowing developers to convert any amount from one metal to another or to/from USD. This is particularly useful for applications that deal with multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Track how platinum prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve open, high, low, and close prices for a specific time period, which is essential for technical analysis and trading strategies.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency across data retrieval.
- Available Endpoints: The Metals-API includes 14 endpoints, each providing distinct functionalities to cater to various data needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring developers have access to the latest symbols and their specifications.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users 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 effective implementation. Below are examples of various endpoints, including their JSON responses and explanations of each field.
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1761109235,
"base": "USD",
"date": "2025-10-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 success
field indicates whether the request was successful. The timestamp
provides the time of the request, while base
shows the base currency (USD). The date
field indicates when the rates were last updated, and the rates
object contains the exchange rates for various metals, including platinum (XPT).
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1761022835,
"base": "USD",
"date": "2025-10-21",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specific date. The rates
object includes the prices of platinum and other metals, allowing developers to analyze past performance.
Time-Series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2025-10-15",
"end_date": "2025-10-22",
"base": "USD",
"rates": {
"2025-10-15": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-10-17": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-22": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to retrieve rates for multiple dates, facilitating trend analysis over time. Each date in the rates
object provides the corresponding prices for platinum and other metals.
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": 1761109235,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint allows users to convert a specified amount from one currency to another. The query
object shows the conversion parameters, while the result
field provides the converted amount.
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-15",
"end_date": "2025-10-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 insights into how prices have changed over a specified period. The change
and change_pct
fields indicate the magnitude and percentage of the fluctuation, respectively.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1761109235,
"base": "USD",
"date": "2025-10-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"
}
The OHLC endpoint provides essential data for traders and analysts, allowing them to assess market performance over a specific timeframe. Each field within the rates
object provides critical information for technical analysis.
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1761109235,
"base": "USD",
"date": "2025-10-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 endpoint provides real-time bid and ask prices, which are crucial for traders looking to make informed decisions based on market conditions. The spread
field indicates the difference between the bid and ask prices, providing insights into market liquidity.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers seeking to access historical prices for platinum and other metals. By utilizing the various endpoints offered by the API, developers can create applications that analyze trends, forecast prices, and provide real-time data to users. The ability to retrieve both current and historical data empowers developers to build robust financial applications that can adapt to the ever-changing market landscape.
For those interested in exploring the full capabilities of the Metals-API, I encourage you to check out the Metals-API Documentation for detailed information on each endpoint and its functionalities. Additionally, the Metals-API Supported Symbols page provides a comprehensive list of all available symbols, ensuring you have the necessary data at your fingertips.
As the demand for accurate metals pricing continues to grow, leveraging APIs like Metals-API will be essential for developers looking to stay ahead in the financial technology space. Whether you are building applications for trading, investment analysis, or market research, the Metals-API offers the tools you need to succeed.