How to get Platinum (XPT) prices using this API for your financial applications

Introduction
In the world of finance and investment, staying updated with real-time data is crucial for making informed decisions. For those interested in precious metals, particularly Platinum (XPT), accessing accurate pricing information is essential. This blog post will delve into how to get Platinum prices using the Metals-API, exploring its capabilities, key features, and how it can empower developers to create innovative financial applications.
Metals-API Information
About Platinum (XPT)
Platinum, represented by the symbol XPT, is a precious metal known for its rarity and unique properties. It plays a significant role in various industries, particularly in green technology applications, sustainable innovation, and clean energy solutions. As the world shifts towards digital transformation and smart technology integration, Platinum's applications are expanding, making it a valuable asset for investors and developers alike.
In the automotive industry, for instance, Platinum is used in catalytic converters, which help reduce harmful emissions. This aligns with the global push for cleaner energy solutions. Additionally, Platinum is increasingly being utilized in hydrogen fuel cells, which are pivotal for the development of sustainable energy systems. As such, having access to real-time pricing data for Platinum is vital for stakeholders in these sectors.
API Description
The Metals-API is a powerful tool that provides developers with access to real-time and historical data for various metals, including Platinum. This API is designed to facilitate the integration of metals pricing into financial applications, enabling developers to build next-generation solutions that leverage accurate and timely data.
With the Metals-API, developers can access a range of endpoints that provide different functionalities. This includes the ability to retrieve the latest rates, historical data, and even perform conversions between different metals and currencies. The API's innovative design allows for seamless integration into existing applications, making it easier for developers to enhance their offerings with valuable metals data.
Key Features and Endpoints
The Metals-API offers several key features that are particularly beneficial for developers working with Platinum pricing:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data for Platinum and other metals. Rates are updated every 60 minutes, every 10 minutes, or even more frequently, ensuring that users have access to the most current information.
- Historical Rates Endpoint: This feature allows users to access historical rates for Platinum dating back to 2019. By appending a specific date to the API request, developers can retrieve past pricing data, 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. Understanding the bid-ask spread is crucial for traders and investors looking to make informed decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts from one metal to another or to/from USD. This is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice. This feature is invaluable for analyzing price movements over specific periods.
- Fluctuation Endpoint: This endpoint provides information about how Platinum prices fluctuate on a day-to-day basis, helping users understand market volatility.
- Carat Endpoint: Users can retrieve information about Gold rates by Carat, which can be useful in applications that deal with jewelry or precious metal trading.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest price of Platinum over a specified period.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for Platinum, which is essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols, dating back to 2008, which is beneficial for users interested in long-term trends.
- API Key: Each user is provided with a unique API key that must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API comes with multiple endpoints, each providing different functionalities, allowing developers to choose the ones that best fit their needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies and metals, ensuring that developers have access to the latest symbols.
- Gold Price India Endpoint: Retrieve the latest gold price in India, which can be useful for applications focused on regional markets.
- News Endpoint: The API allows users to retrieve the latest news articles related to various metals, keeping developers and users informed about market trends.
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. This ensures that developers can easily find the symbols they need for their applications.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1746759623,
"base": "USD",
"date": "2025-05-09",
"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 that the current price of Platinum (XPT) is 0.000912 per troy ounce, relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1746673223,
"base": "USD",
"date": "2025-05-08",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical price of Platinum on May 8, 2025, allowing developers to analyze past trends.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"base": "USD",
"rates": {
"2025-05-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-09": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of Platinum prices over a specified period, which is useful for trend analysis.
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": 1746759623,
"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), showcasing the conversion capabilities of the API.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"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 Platinum prices fluctuated over the specified period, which is essential for traders.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1746759623,
"base": "USD",
"date": "2025-05-09",
"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 open, high, low, and close prices for Platinum, which is crucial for technical analysis and trading strategies.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1746759623,
"base": "USD",
"date": "2025-05-09",
"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 for Platinum, which is essential for traders looking to execute buy or sell orders.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers looking to integrate real-time Platinum pricing into their financial applications. With its comprehensive set of features, including the latest rates, historical data, and conversion capabilities, the API empowers developers to create innovative solutions that meet the needs of their users.
By leveraging the capabilities of the Metals-API, developers can enhance their applications with accurate and timely data, enabling better decision-making in the precious metals market. Whether you are building a trading platform, a financial analysis tool, or a market research application, the Metals-API provides the necessary tools to succeed.
For more information on how to get started, refer to the Metals-API Documentation and explore the various endpoints available to you. With the right tools and data, you can unlock the full potential of Platinum and other precious metals in your applications.