How to Get Real-Time LBMA Platinum Pm (LBXPTPM) Prices Using Python and Metals-API
How to Get Real-Time LBMA Platinum Pm (LBXPTPM) Prices Using Python and Metals-API
In today's fast-paced financial landscape, accessing real-time market data is crucial for developers and analysts alike. One of the most sought-after data points is the real-time price of Platinum, particularly the LBMA Platinum PM (LBXPTPM) prices. This blog post will guide you through the process of accessing real-time Platinum market prices using the Metals-API. We will explore the various features of the API, provide step-by-step instructions, and present example API calls to help you integrate this valuable data into your applications.
Metals-API Information
The Metals-API is a powerful tool that provides real-time and historical data for various metals, including Platinum (XPT). With its innovative approach to data delivery, the API empowers developers to create next-generation applications that leverage real-time market insights. Whether you are building a trading platform, a financial analysis tool, or a market monitoring application, the Metals-API offers the flexibility and reliability you need.
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, Platinum is increasingly being utilized in catalytic converters, fuel cells, and other smart technology integrations. The demand for real-time data on Platinum prices is essential for businesses and investors looking to navigate this evolving landscape.
API Description
The Metals-API provides a comprehensive suite of endpoints that allow users to access real-time and historical data for various metals. With capabilities such as the Latest Rates Endpoint, Historical Rates Endpoint, and more, developers can easily retrieve the information they need to make informed decisions. The API's design focuses on innovation and technological advancement, making it a transformative tool for accessing metals data.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to serve specific needs:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. You can retrieve the latest prices for Platinum and other metals with just a simple API call.
- Historical Rates Endpoint: Access historical rates dating back to 2019. This feature allows you to analyze price trends over time, which is crucial for market analysis and forecasting.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for Platinum and other metals. This information is vital for traders looking to make informed buying and selling decisions.
- Convert Endpoint: Easily convert amounts between different metals or to/from USD. This feature is particularly useful for financial applications that require currency conversion.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This endpoint is perfect for analyzing price movements over specific periods.
- Fluctuation Endpoint: Track how prices fluctuate between two dates, providing insights into market volatility.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for Platinum over a specified period, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve OHLC data for a specific time period, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, offering a broader perspective on market trends.
- API Key: Your unique API key is required for authentication and must be included in your API requests.
- API Response: The API returns exchange rates relative to USD, with all data delivered in a structured JSON format.
- Available Endpoints: The API features 14 endpoints, each providing distinct functionalities to cater to various user needs.
- News Endpoint: Retrieve the latest news articles related to metals, keeping you 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
To illustrate the capabilities of the Metals-API, let's explore some example responses from various endpoints.
Latest Rates Endpoint
{
"success": true,
"timestamp": 1762477427,
"base": "USD",
"date": "2025-11-07",
"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"
}
The response above shows the latest rates for various metals, including Platinum (XPT). The "rates" field contains the current price per troy ounce, which is essential for traders and analysts.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1762391027,
"base": "USD",
"date": "2025-11-06",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example demonstrates how to access historical rates for Platinum. The "rates" field provides the price for a specific date, allowing for trend analysis.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-10-31",
"end_date": "2025-11-07",
"base": "USD",
"rates": {
"2025-10-31": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-11-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides daily rates for a specified period, which is invaluable for analyzing price movements over time.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1762477427,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example shows how to convert an amount from USD to Platinum (XAU). The "result" field indicates the equivalent amount in troy ounces, which is useful for financial calculations.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-31",
"end_date": "2025-11-07",
"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"
}
The fluctuation endpoint provides insights into how prices change over a specified period, which is crucial for understanding market dynamics.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1762477427,
"base": "USD",
"date": "2025-11-07",
"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 response provides a comprehensive view of price movements within a specific time frame, essential for traders conducting technical analysis.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1762477427,
"base": "USD",
"date": "2025-11-07",
"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"
}
The bid/ask endpoint provides current bid and ask prices for Platinum, which is essential for traders looking to execute orders at the best possible prices.
Conclusion
Accessing real-time LBMA Platinum PM prices using the Metals-API is a straightforward process that can significantly enhance your financial applications. By leveraging the various endpoints offered by the API, you can retrieve not only the latest prices but also historical data, bid/ask prices, and much more. This comprehensive access to metals data empowers developers to create innovative solutions that meet the demands of today's market.
For more information on how to implement these features, 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.