Get Accurate Historical Prices for LME Lead (LME-LEAD) via API
Introduction
In the ever-evolving landscape of financial markets, obtaining accurate historical prices for metals such as lead (LME-LEAD) is crucial for traders, analysts, and developers alike. The Metals-API offers a robust solution for accessing real-time and historical metal prices, including lead, through a comprehensive API. This blog post will delve into the capabilities of the Metals-API, focusing on how developers can leverage its features to retrieve accurate historical prices and insights into market trends.
Understanding Lead (XLE)
Lead, represented by the symbol XLE, is a significant metal in various industries, including construction, batteries, and radiation shielding. As the world shifts towards digital transformation, the metal markets are experiencing technological innovation that enhances data analytics and insights. The integration of smart technologies is paving the way for future trends, making it essential for developers to stay informed about the latest advancements in metal pricing.
Digital Transformation in Metal Markets
The digital transformation of metal markets is characterized by the adoption of advanced technologies that streamline operations and improve data accessibility. The Metals-API plays a pivotal role in this transformation by providing developers with real-time access to metal prices, enabling them to build applications that can analyze market trends and make informed decisions.
Technological Innovation and Advancement
Technological advancements in data analytics have revolutionized how traders and analysts interpret market data. The Metals-API empowers users to access historical prices, allowing for in-depth analysis of price movements over time. This capability is crucial for understanding market dynamics and making strategic trading decisions.
Data Analytics and Insights
With the Metals-API, developers can harness the power of data analytics to gain insights into price fluctuations and trends. The API provides various endpoints that allow users to retrieve historical rates, bid and ask prices, and time-series data, enabling comprehensive market analysis.
API Description
The Metals-API is designed to provide developers with a seamless experience in accessing metal prices. It offers a wide range of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2008. The API's capabilities empower developers to build next-generation applications that can analyze and visualize metal price trends effectively.
Key Features and Endpoints
The Metals-API includes several key features that enhance its functionality:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or more frequently. This feature is essential for traders who need up-to-the-minute pricing information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date (YYYY-MM-DD) to the API request, developers can retrieve historical price data for analysis.
- Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert any amount from one currency to another, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it easier to analyze trends over specific periods.
- Fluctuation Endpoint: Users can retrieve information about how currencies fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This endpoint allows users to retrieve information about gold rates by carat, catering to specific market needs.
- Lowest/Highest Price Endpoint: Developers can query the API to get the lowest and highest prices for a specified date range, aiding in price analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with open, high, low, and close prices for a specific date, essential for technical analysis.
- Historical LME Endpoint: This endpoint allows users to access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Each user is assigned a unique API key, which must be included in the API request to authenticate access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API features 14 endpoints, each providing distinct functionalities to cater to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest information.
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 developers. 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": 1780877910,
"base": "USD",
"date": "2026-06-08",
"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 API successfully retrieved the latest rates for various metals, with the base currency being USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1780791510,
"base": "USD",
"date": "2026-06-07",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for a specific date, allowing users to analyze past market behavior.
Time-Series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-06-01",
"end_date": "2026-06-08",
"base": "USD",
"rates": {
"2026-06-01": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-03": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-08": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of exchange rates, enabling users to track price movements over a specified period.
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": 1780877910,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates the conversion of an amount from USD to gold (XAU), providing the resulting value in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-01",
"end_date": "2026-06-08",
"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 metal prices fluctuated over a specified period, highlighting both absolute and percentage changes.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1780877910,
"base": "USD",
"date": "2026-06-08",
"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 essential OHLC data, which is critical for traders conducting technical analysis.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1780877910,
"base": "USD",
"date": "2026-06-08",
"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 bid and ask prices, which are vital for understanding market liquidity and making informed trading decisions.
Conclusion
In conclusion, the Metals-API is a powerful tool for developers seeking to access accurate historical prices for metals like lead (LME-LEAD). By leveraging its various endpoints, developers can build applications that provide real-time insights into market trends, analyze historical price movements, and make informed trading decisions. The API's capabilities, including the latest rates, historical data, and fluctuation tracking, empower users to navigate the complexities of the metal markets effectively.
For more detailed information about the API's features, refer to the Metals-API Documentation. To explore the full range of supported symbols, visit the Metals-API Supported Symbols page. By integrating the Metals-API into your applications, you can harness the power of real-time metals data and stay ahead in the dynamic world of metal trading.