Access Sri Lankan Rupee (LKR) Historical Prices using this API
Access Sri Lankan Rupee (LKR) Historical Prices using this API
The Sri Lankan Rupee (LKR) is an essential currency in the South Asian financial landscape. With the rise of digital transformation in metal markets, understanding the historical prices of the LKR is crucial for developers and analysts alike. By leveraging the Metals-API, users can access real-time and historical data on various metals and currencies, including the LKR. This blog post will delve into the capabilities of the Metals-API, focusing on its innovative features and how it empowers developers to create next-generation applications.
About Sri Lankan Rupee (LKR)
The Sri Lankan Rupee is the official currency of Sri Lanka, and its value is influenced by various economic factors, including inflation rates, interest rates, and the country's trade balance. In recent years, the integration of smart technology and data analytics has transformed how financial data is accessed and utilized. The Metals-API stands at the forefront of this transformation, providing developers with the tools needed to analyze and interpret currency fluctuations effectively.
As the demand for accurate and timely financial data grows, the Metals-API offers a comprehensive solution for accessing historical prices and real-time data. This API not only supports the LKR but also provides insights into the broader metal market, enabling developers to create applications that can predict trends and analyze market behaviors.
API Description
The Metals-API is a powerful tool designed for developers looking to integrate real-time metals data into their applications. With its extensive capabilities, the API allows users to access a wide range of functionalities, including retrieving historical prices, current rates, and conversion data. The API is built on modern technological advancements, ensuring that users receive accurate and up-to-date information.
One of the key features of the Metals-API is its ability to deliver data in a structured JSON format, making it easy for developers to parse and utilize the information in their applications. The API's endpoints are designed to cater to various use cases, from simple currency conversions to complex data analysis tasks.
For detailed information on how to implement the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on endpoint usage, authentication, and response handling.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that serve different purposes, allowing developers to tailor their applications to meet specific needs. Below are some of the key features and their potential applications:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals and currencies, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. Developers can use this data to create applications that require 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 in the YYYY-MM-DD format, developers can retrieve past exchange rates, which is invaluable for trend analysis and financial forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing strategies. This data can be crucial for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a dedicated currency conversion endpoint, enabling users to convert any amount from one currency to another. This feature is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two chosen dates. This endpoint is ideal for analyzing trends over specific periods, allowing for more informed decision-making.
- Fluctuation Endpoint: This endpoint provides information on how currencies fluctuate on a day-to-day basis, offering insights into market volatility and helping developers build applications that can react to market changes.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is essential for jewelers and investors in the gold market. This feature allows for precise calculations based on the quality of gold.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices of metals over a specified period, which can be useful for identifying market trends and making investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access OHLC data for specific time periods, which is critical for technical analysis and understanding market movements.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for in-depth analysis of metal prices over time.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API features 14 different endpoints, each designed to provide specific functionalities, making it a versatile tool for developers.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, allowing developers to stay informed about the symbols they can use.
- News Endpoint: Users can retrieve the latest news articles related to various metals, providing context and insights into market movements.
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. This resource is invaluable for developers looking to understand the available options and integrate them into their applications.
API Endpoint Examples and Responses
To illustrate the functionality of the Metals-API, below are examples of various endpoints along with their JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1776125737,
"base": "USD",
"date": "2026-04-14",
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1776039337,
"base": "USD",
"date": "2026-04-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2026-04-07",
"end_date": "2026-04-14",
"base": "USD",
"rates": {
"2026-04-07": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-09": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-14": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
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": 1776125737,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-07",
"end_date": "2026-04-14",
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1776125737,
"base": "USD",
"date": "2026-04-14",
"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
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1776125737,
"base": "USD",
"date": "2026-04-14",
"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"
}
Conclusion
Accessing historical prices of the Sri Lankan Rupee (LKR) through the Metals-API opens up a world of possibilities for developers and analysts. With its robust set of features, including real-time rates, historical data, and various endpoints tailored for specific needs, the Metals-API is an invaluable resource for anyone looking to integrate financial data into their applications.
By utilizing the API's capabilities, developers can create applications that not only track currency fluctuations but also analyze market trends and make informed decisions. The comprehensive documentation available at the Metals-API Documentation ensures that users can easily navigate the API's functionalities, while the Supported Symbols page provides essential information on available currencies.
In a rapidly evolving financial landscape, the Metals-API stands out as a leader in providing accurate and timely data, empowering developers to build innovative solutions that meet the demands of today's market. Whether you are looking to analyze historical trends or implement real-time data tracking, the Metals-API is your go-to solution for accessing Sri Lankan Rupee historical prices and much more.