Access Lithium Feb 2026 (LMG26) Exchange Rate API Usage Examples in JSON Format
Access Lithium Feb 2026 (LMG26) Exchange Rate API Usage Examples in JSON Format
In the rapidly evolving landscape of metal markets, the ability to access real-time data is paramount for developers and businesses alike. The Metals-API provides a robust solution for retrieving exchange rates for various metals, including Lithium (LITHIUM), Gold (XAU), and others. This blog post will delve into the specifics of utilizing the Metals-API to retrieve Gold exchange rates in JSON format, complete with sample API responses and integration tips. By leveraging this API, developers can create innovative applications that harness the power of real-time data analytics and insights.
About Lithium (LITHIUM)
Lithium has emerged as a critical component in the digital transformation of metal markets, particularly with the rise of electric vehicles and renewable energy technologies. As industries increasingly rely on lithium-ion batteries, understanding its market dynamics becomes essential. The Metals-API not only provides access to real-time exchange rates but also empowers developers to integrate smart technology solutions that can analyze trends and forecast future movements in the lithium market.
Technological innovation and advancement in data analytics are at the forefront of this transformation. By utilizing the Metals-API, developers can gain insights into market fluctuations, enabling them to make informed decisions based on accurate and timely data. The API's capabilities extend beyond mere data retrieval; it offers a transformative potential that can redefine how businesses interact with metal markets.
API Description
The Metals-API is a powerful tool designed for developers seeking to access real-time metals data. It provides a comprehensive suite of endpoints that allow users to retrieve exchange rates, historical data, and market insights. With a focus on innovation, the API enables the development of next-generation applications that can analyze and visualize metal market trends.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to cater to specific needs within the metal trading ecosystem. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data, updated based on your subscription plan. Depending on your plan, you can receive updates 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 query. This feature is invaluable for analyzing market trends over time.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing traders to make informed decisions based on current market conditions.
- Convert Endpoint: This endpoint allows for seamless currency conversion, enabling users to convert any amount from one metal to another or to/from USD.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, facilitating in-depth analysis of market movements.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which is essential for jewelers and traders in the luxury market.
- Lowest/Highest Price Endpoint: This endpoint allows you to query the API for the lowest and highest prices within a specified timeframe.
- Open/High/Low/Close (OHLC) Price Endpoint: Get detailed OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of market trends.
- API Key: Your unique API key is required for authentication, ensuring secure access to the API's features.
- API Response: Exchange rates are delivered relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you informed about market developments.
For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, let's explore some example responses for various endpoints, focusing on Gold (XAU) exchange rates.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1775362062,
"base": "USD",
"date": "2026-04-05",
"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 current exchange rate for Gold (XAU) is 0.000482 per troy ounce, relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1775275662,
"base": "USD",
"date": "2026-04-04",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows the historical exchange rate for Gold on April 4, 2026, allowing developers to analyze past market performance.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-03-29",
"end_date": "2026-04-05",
"base": "USD",
"rates": {
"2026-03-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-31": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-05": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of Gold exchange rates over a specified period, enabling trend analysis and forecasting.
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": 1775362062,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example demonstrates how to convert 1000 USD to Gold (XAU), resulting in 0.482 troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-29",
"end_date": "2026-04-05",
"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 Gold and other metals fluctuated over a specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1775362062,
"base": "USD",
"date": "2026-04-05",
"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 endpoint provides a comprehensive view of the market's performance for Gold, including its opening, highest, lowest, and closing prices.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1775362062,
"base": "USD",
"date": "2026-04-05",
"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 the current bid and ask prices for Gold, which are essential for traders looking to execute buy or sell orders.
Conclusion
The Metals-API offers a comprehensive suite of tools for developers looking to access real-time and historical data on various metals, including Gold (XAU). By utilizing the API's endpoints, developers can create applications that provide valuable insights into market trends, enabling informed decision-making and strategic planning.
From retrieving the latest rates to analyzing historical data and tracking fluctuations, the Metals-API empowers developers to harness the full potential of real-time metals data. For further exploration of the API's capabilities, refer to the Metals-API Documentation and the Metals-API Supported Symbols page.
As the metal markets continue to evolve, staying ahead of trends and leveraging advanced data analytics will be crucial for success. The Metals-API stands as a vital resource for developers aiming to innovate and excel in this dynamic environment.