How to Get Real-Time LME Lead (LME-LEAD) Prices with Metals-API

How to Get Real-Time LME Lead (LME-LEAD) Prices with Metals-API
Metals-API Information
Metals-API is a comprehensive JSON API that provides real-time and historical data for various metals, including lead. With its robust infrastructure, the API allows developers to integrate metal price data into their applications seamlessly. The API is designed for ease of use, offering a variety of endpoints to cater to different needs, from retrieving the latest rates to accessing historical data.
About Lead (XLE)
API Description
- 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.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your API call.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for metals, providing insights into market liquidity.
- Convert Endpoint: Convert any amount from one metal to another or to/from USD, facilitating easy calculations for traders.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, allowing for in-depth analysis of price trends.
- Fluctuation Endpoint: Track how metal prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for a specific time period, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Your unique API key is required to authenticate your requests, ensuring secure access to the API.
- API Response: All exchange rates are delivered relative to USD, with data returned in a structured JSON format.
- Supported Symbols Endpoint: Retrieve a constantly updated list of all available metal symbols.
- News Endpoint: Access the latest news articles related to various metals, keeping you informed about market developments.
Accessing Real-Time LME Lead Prices
Step 1: Sign Up for Metals-API
Metals-API Website and sign up for an account. After registration, you will receive an API key that you will use to authenticate your requests.
Step 2: Choose Your Endpoint
Latest Rates Endpoint. This endpoint provides the most current prices for lead and other metals.
Step 3: Make Your API Call
https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XLE
YOUR_API_KEY with your actual API key. This call will return the latest lead prices in USD.
Step 4: Analyze the Response
{
"success": true,
"timestamp": 1755568955,
"base": "USD",
"date": "2025-08-19",
"rates": {
"XLE": 0.000482
},
"unit": "per troy ounce"
}
success field indicates whether the request was successful, while the timestamp
and date
fields provide context for the data.
Understanding API Responses
- success: A boolean indicating if the API call was successful.
- timestamp: The time at which the data was retrieved, represented as a Unix timestamp.
- base: The base currency for the exchange rates, which is typically USD.
- date: The date for which the rates are applicable.
- rates: An object containing the metal symbols and their corresponding prices.
- unit: The unit of measurement for the prices, usually per troy ounce.
Advanced Features and Use Cases
Historical Data Access
Historical Rates Endpoint, you can access historical prices for lead and other metals. This is particularly useful for analyzing trends over time. To retrieve historical data, append a date to your API call:
https://metals-api.com/api/historical?access_key=YOUR_API_KEY&base=USD&symbols=XLE&date=2025-08-18
Time-Series Analysis
Time-Series Endpoint allows you to query daily historical rates between two dates. This is beneficial for traders looking to analyze price movements over a specific period:
https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&base=USD&symbols=XLE&start_date=2025-08-12&end_date=2025-08-19
Bid and Ask Prices
Bid and Ask Endpoint provides real-time bid and ask prices for lead:
https://metals-api.com/api/bid-ask?access_key=YOUR_API_KEY&base=USD&symbols=XLE
Common Pitfalls and Troubleshooting
- Invalid API Key: Ensure that your API key is correctly entered in your requests.
- Rate Limiting: Be aware of your subscription plan's rate limits to avoid exceeding the allowed number of requests.
- Incorrect Endpoint Usage: Double-check that you are using the correct endpoint for your desired data.
Conclusion
Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals. Embrace the future of metal trading with the innovative capabilities of the Metals-API.