Retrieve Lanthanum (LTH) Historical Prices with this API

Retrieve Lanthanum (LTH) Historical Prices with this API
In the rapidly evolving world of metals trading, the ability to access historical prices and real-time data is crucial for developers and businesses alike. One such metal that has garnered attention is Lanthanum (LTH). This blog post will delve into how to retrieve historical prices for Lanthanum using the Metals-API, exploring its features, capabilities, and the transformative potential of real-time metals data.
About Lanthanum (LTH)
Lanthanum is a rare earth metal that plays a significant role in various technological applications, including catalysts in petroleum refining, phosphors in color television tubes, and in the production of special glasses. As industries increasingly rely on digital transformation, the demand for accurate and timely data on metals like Lanthanum is paramount. The integration of smart technology and data analytics into metal markets has revolutionized how businesses operate, allowing for more informed decision-making and strategic planning.
Technological innovation in the metals market has led to the development of APIs that provide real-time data and historical insights. The Metals-API is one such tool that empowers developers to build next-generation applications by providing comprehensive access to metals data, including Lanthanum. By leveraging this API, developers can create applications that analyze market trends, track price fluctuations, and optimize trading strategies.
API Description
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical metals data. It offers a range of endpoints that cater to various needs, from retrieving the latest rates to accessing historical data dating back to 2019. The API's capabilities are not just limited to providing data; it also enables developers to build applications that can analyze trends, forecast prices, and make data-driven decisions.
With the Metals-API, developers can harness the power of data analytics to gain insights into market dynamics. The API supports multiple endpoints, each designed to fulfill specific requirements. For instance, the Latest Rates Endpoint provides real-time exchange rate data, while the Historical Rates Endpoint allows users to query historical prices for Lanthanum and other metals.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data retrieval needs:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or every 10 minutes. This is particularly useful for traders who need to stay updated on the latest market conditions.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. By appending a specific date to the API call, developers can retrieve historical prices for Lanthanum, enabling them to analyze past trends and make informed predictions.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for Lanthanum and other metals, providing insights into market liquidity and pricing strategies.
- Convert Endpoint: The API includes a currency conversion endpoint, which can be used to convert any amount from one metal to another or to/from USD. This is essential for businesses operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Users can track how prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This endpoint retrieves information about gold rates by carat, which is useful for jewelers and traders dealing in precious metals.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest prices for Lanthanum over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific time period, essential for technical analysis.
- Historical LME Endpoint: Historical rates for LME symbols are accessible through this endpoint, dating back to 2008, which is beneficial for users interested in long-term trends.
- API Key: The unique API key is necessary for authentication and must be included in the API requests to access the data.
- API Response: The exchange rates delivered by the Metals-API are relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API comes with numerous endpoints, each providing different functionalities, allowing developers to tailor their applications to specific needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies and metals, ensuring users can access the data they need.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1747558813,
"base": "USD",
"date": "2025-05-18",
"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, including Lanthanum. The rates are provided in terms of troy ounces, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1747472413,
"base": "USD",
"date": "2025-05-17",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to access historical rates for a specific date. The response includes the rates for various metals, allowing users to analyze past performance.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-05-11",
"end_date": "2025-05-18",
"base": "USD",
"rates": {
"2025-05-11": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-13": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-18": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to retrieve data over a specified period, making it easier to identify trends and patterns in the market.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747558813,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert an amount from one metal to another. In this case, it shows the conversion of 1000 USD to troy ounces of gold.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-11",
"end_date": "2025-05-18",
"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 endpoint provides insights into price fluctuations over a specified period, which is essential for traders looking to understand market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1747558813,
"base": "USD",
"date": "2025-05-18",
"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 the open, high, low, and close prices for a specific date, which is crucial for technical analysis and trading strategies.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1747558813,
"base": "USD",
"date": "2025-05-18",
"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 endpoint provides current bid and ask prices, which are essential for traders to understand market conditions and make informed decisions.
Conclusion
In conclusion, the Metals-API offers a comprehensive solution for developers looking to access historical prices and real-time data for Lanthanum and other metals. By leveraging the various endpoints provided by the API, developers can create powerful applications that analyze market trends, track price fluctuations, and optimize trading strategies. The integration of smart technology and data analytics into the metals market is transforming how businesses operate, making it essential for developers to stay informed about the latest tools and technologies available.
For more information on how to get started with the Metals-API, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals. By utilizing these resources, developers can unlock the full potential of real-time metals data and drive innovation in their applications.