Get LBMA Gold Pm (LBXAUPM) Daily Historical Prices using this API

Get LBMA Gold Pm (LBXAUPM) Daily Historical Prices using this API
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. One of the most sought-after metals is gold, represented by the symbol XAU. With the rise of digital transformation in the financial sector, developers and traders alike are turning to APIs to harness real-time data and historical insights. This blog post will delve into how to obtain historical prices for LBMA Gold PM (LBXAUPM) using the Metals-API, a powerful tool that provides comprehensive data on precious metals.
About Gold (XAU)
Gold has been a symbol of wealth and a reliable store of value for centuries. In today's digital age, the integration of technology in trading has revolutionized how investors access and analyze market data. The digital transformation in precious metals trading has led to the emergence of data analytics and market insights that empower traders to make better decisions.
With the advent of APIs, developers can now create applications that leverage real-time data for price discovery and trading strategies. The Metals-API provides a robust platform that allows users to access historical prices, current rates, and various other functionalities that enhance trading capabilities. This API is not just a tool; it represents a shift towards innovation in the financial markets, enabling users to build next-generation applications that can adapt to the fast-paced world of trading.
API Description
The Metals-API is designed to provide developers with the tools necessary to access real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API is built on a foundation of innovation and technological advancement, offering features that empower users to create applications that can analyze market trends and make data-driven decisions.
One of the key advantages of the Metals-API is its ability to deliver real-time data. Depending on your subscription plan, the API can return exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This level of granularity ensures that traders have the most current information at their fingertips, allowing them to react swiftly to market changes.
Additionally, the Metals-API offers a variety of endpoints that cater to different needs. For instance, the Historical Rates Endpoint allows users to access historical rates dating back to 2019, providing valuable insights into price trends over time. This feature is particularly useful for traders looking to analyze past performance and make predictions about future movements.
Key Features and Endpoints
The Metals-API boasts a comprehensive suite of features that cater to the diverse needs of traders and developers. Here are some of the most notable endpoints:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. Depending on your subscription plan, you can receive updates every 60 minutes, every 10 minutes, or even more frequently. This ensures that you always have access to the most current market information.
- Historical Rates Endpoint: Access historical exchange rates for any date since 2019. This endpoint allows you to query the Metals-API by appending a specific date, enabling you to analyze past price movements and trends.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals. This feature is essential for traders who need to make quick decisions based on current market conditions.
- Convert Endpoint: This endpoint allows you to convert any amount from one metal to another or to/from USD. This is particularly useful for traders who deal with multiple currencies and need to understand the equivalent values.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This feature is invaluable for analyzing trends over specific periods.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis. This endpoint provides insights into market volatility, helping traders to gauge risk.
- Carat Endpoint: Retrieve information about gold rates by carat. This is particularly useful for jewelers and those in the jewelry industry who need precise measurements.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specific date. This feature helps traders identify price ranges and make informed decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Get the open, high, low, and close prices for a specific date. This data is crucial for technical analysis and understanding market trends.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for those trading in industrial metals.
- API Key: Your unique API key is required to access the Metals-API. This key is passed into the API base URL's access_key parameter for authentication.
- API Response: The API delivers exchange rates relative to USD by default. All data is returned in a structured JSON format, making it easy to integrate into applications.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals supported by the API.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is essential for traders operating in the Indian market.
- News Endpoint: Stay updated with the latest news articles related to various metals, which can impact market conditions and trading strategies.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers looking to integrate its functionalities into their applications. Below are examples of various API endpoints along with their expected JSON responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1748977215,
"base": "USD",
"date": "2025-06-03",
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1748890815,
"base": "USD",
"date": "2025-06-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-27",
"end_date": "2025-06-03",
"base": "USD",
"rates": {
"2025-05-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
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": 1748977215,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-27",
"end_date": "2025-06-03",
"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"
}
OHLC (Open/High/Low/Close) Price Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1748977215,
"base": "USD",
"date": "2025-06-03",
"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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1748977215,
"base": "USD",
"date": "2025-06-03",
"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"
}
Conclusion
In conclusion, the Metals-API provides a comprehensive solution for accessing real-time and historical data on precious metals, particularly gold. With its array of endpoints, developers can create powerful applications that leverage this data for trading, analysis, and decision-making. The API's capabilities, including the Latest Rates, Historical Rates, and various conversion and fluctuation endpoints, empower users to gain insights into market trends and make informed trading decisions.
As the financial landscape continues to evolve, embracing digital asset solutions and technology integration will be essential for traders and developers alike. By utilizing the Metals-API, you can stay ahead of the curve and harness the power of real-time metals data to enhance your trading strategies and applications.
For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols to understand the full range of functionalities available at your fingertips.