Fetch Lead (LEAD) Historical Prices using this API for Financial Modeling

Introduction
Metals-API offers a robust solution for developers seeking to fetch Lead historical prices and other metal data efficiently. This blog post will delve into the capabilities of the Metals-API, exploring its innovative features, endpoints, and the transformative potential of real-time metals data.
About Lead (XLE)
Digital Transformation in Metal Markets
Technological Innovation and Advancement
Latest Rates Endpoint provides real-time exchange rate data, while the Historical Rates Endpoint allows users to access historical prices dating back to 2019. This capability is essential for developers looking to build applications that require historical data for analysis and forecasting.
Data Analytics and Insights
Time-Series Endpoint allows users to query daily historical rates between two dates, providing a comprehensive view of price movements. This data can be instrumental in identifying patterns, making predictions, and informing investment strategies.
Smart Technology Integration
Fluctuation Endpoint enables users to track how Lead prices fluctuate on a day-to-day basis, providing insights into market volatility. This information is crucial for traders who need to react quickly to changing market conditions.
Future Trends and Possibilities
Convert Endpoint, which allows for currency conversion between metals and USD, and the OHLC Price Endpoint, which provides open, high, low, and close prices, the API is well-equipped to support a wide range of applications.
API Description
Metals-API Documentation page.
Key Features and Endpoints
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or 10 minutes. It is essential for applications that require the most current pricing information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a date to the API request, developers can retrieve historical prices for Lead and other metals.
- Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: This endpoint enables users to convert any amount from one metal to another or to/from USD, facilitating seamless transactions and analysis.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates, allowing for in-depth analysis of price trends over time.
- Fluctuation Endpoint: This endpoint provides information about how Lead prices fluctuate on a day-to-day basis, which is crucial for understanding market volatility.
- Carat Endpoint: Users can retrieve information about Gold rates by Carat, which is particularly useful for jewelers and investors in precious metals.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API to get the lowest and highest price for Lead over a specified period.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access open, high, low, and close prices for Lead, providing a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, making it a valuable resource for historical analysis.
- API Key: Users must pass their unique API Key into the API base URL's access_key parameter to authenticate their requests.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API comes with a constantly updated endpoint returning all available currencies, ensuring users have access to the latest data.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to a specific market need.
- News Endpoint: Users can retrieve the latest news articles related to various metals, providing context and insights into market movements.
List of Symbols
Metals-API Supported Symbols page. This resource is invaluable for developers looking to integrate specific metal data into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1754280020,
"base": "USD",
"date": "2025-08-04",
"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"
}
success field indicates whether the request was successful. The timestamp
provides the time of the data retrieval, while base
indicates the currency used for the rates. The rates
object contains the exchange rates for various metals, with each symbol representing a specific metal.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1754193620,
"base": "USD",
"date": "2025-08-03",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
date field indicating the specific date for which historical rates are provided. Developers can use this data to analyze past performance and trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-07-28",
"end_date": "2025-08-04",
"base": "USD",
"rates": {
"2025-07-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-07-30": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-08-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
timeseries field indicates that the response contains multiple rates for the specified date range. Each date key in the rates
object contains the corresponding exchange rates for that day, allowing for detailed analysis of price movements over time.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1754280020,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
query object that specifies the conversion parameters. The result
field shows the converted amount, which is particularly useful for applications that require currency conversion capabilities.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-07-28",
"end_date": "2025-08-04",
"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"
}
change and change_pct
fields are particularly useful for understanding market volatility and making informed trading decisions.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1754280020,
"base": "USD",
"date": "2025-08-04",
"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
{
"success": true,
"timestamp": 1754280020,
"base": "USD",
"date": "2025-08-04",
"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"
}
spread field provides insight into the difference between the buying and selling prices, which can impact trading strategies.
Conclusion
Metals-API Website and explore the comprehensive Metals-API Documentation for detailed guidance on implementation and usage.