The Easiest Way to Get Sri Lankan Rupee (LKR) Historical Rates Using API Services
The Easiest Way to Get Sri Lankan Rupee (LKR) Historical Rates Using API Services
In today's fast-paced financial landscape, accessing historical currency rates is crucial for developers and analysts alike. The Sri Lankan Rupee (LKR) is no exception, and obtaining its historical rates can be seamlessly achieved through the Metals-API. This blog post will guide you through the easiest way to retrieve LKR historical prices using the Metals-API, detailing its features, endpoints, and practical applications.
Understanding Metals-API
The Metals-API is a powerful tool designed for developers seeking real-time and historical data on metals and currencies. With its robust architecture, it allows users to access a wide range of functionalities, including retrieving the latest rates, historical data, and conversion capabilities. The API is particularly beneficial for those involved in financial analysis, trading, and market research.
About Tellurium (TE)
While our focus is on the Sri Lankan Rupee, it's worth noting the broader context of metals in financial markets. The digital transformation in metal markets has led to significant technological innovations, enabling better data analytics and insights. Smart technology integration is paving the way for future trends, where real-time data can empower developers to create next-generation applications. The Metals-API exemplifies this shift, providing developers with the tools needed to harness the power of data in their applications.
API Description
The Metals-API offers a comprehensive suite of features that empower developers to build applications that require real-time and historical metals data. With its innovative architecture, the API supports various endpoints that cater to different data needs. Whether you are looking for the latest rates, historical data, or conversion capabilities, the Metals-API has you covered. For detailed documentation, visit the Metals-API Documentation.
Key Features and Endpoints
The Metals-API provides a variety of endpoints that can be utilized to access different types of data. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data, updated at intervals depending on your subscription plan. You can retrieve the latest rates for LKR and other currencies, allowing for immediate insights into market conditions.
- Historical Rates Endpoint: Access historical rates for LKR dating back to 2019. By appending a specific date to your query, you can obtain the historical exchange rate for that day, which is invaluable for trend analysis and financial forecasting.
- Bid And Ask Endpoint: This feature allows you to retrieve real-time bid and ask prices for LKR, providing insights into market liquidity and pricing strategies.
- Convert Endpoint: The conversion endpoint enables you to convert any amount from LKR to other currencies or vice versa, facilitating seamless transactions and financial calculations.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, which is particularly useful for analyzing trends over time.
- Fluctuation Endpoint: This endpoint provides information on how LKR fluctuates on a day-to-day basis, helping you understand market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which can be useful for those involved in precious metals trading.
- Lowest/Highest Price Endpoint: Get the lowest and highest price for LKR over a specified period, which can aid in making informed trading decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for LKR, which is essential for technical analysis and understanding market movements.
- Historical LME Endpoint: Access historical rates for LME symbols, dating back to 2008, which can be beneficial for comprehensive market analysis.
- API Key: Your unique API key is essential for accessing the API and must be included in your requests.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: With 14 different endpoints, the Metals-API offers a wide array of functionalities to meet diverse data needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies, including LKR, to ensure you are working with the most current data.
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.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, let's explore some example endpoints and their corresponding responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals, including LKR:
{
"success": true,
"timestamp": 1785233280,
"base": "USD",
"date": "2026-07-28",
"rates": {
"LKR": 200.00,
"XAU": 0.000482,
"XAG": 0.03815
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
Access historical exchange rates for LKR for any date since 2019:
{
"success": true,
"timestamp": 1785146880,
"base": "USD",
"date": "2026-07-27",
"rates": {
"LKR": 198.50,
"XAU": 0.000485,
"XAG": 0.03825
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for LKR over a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-21",
"end_date": "2026-07-28",
"base": "USD",
"rates": {
"2026-07-21": {
"LKR": 199.00,
"XAU": 0.000485
},
"2026-07-23": {
"LKR": 198.75,
"XAU": 0.000483
},
"2026-07-28": {
"LKR": 200.00,
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from LKR to another currency:
{
"success": true,
"query": {
"from": "LKR",
"to": "USD",
"amount": 1000
},
"info": {
"timestamp": 1785233280,
"rate": 0.005
},
"result": 5,
"unit": "USD"
}
Fluctuation Endpoint
Track rate fluctuations for LKR between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-21",
"end_date": "2026-07-28",
"base": "USD",
"rates": {
"LKR": {
"start_rate": 199.00,
"end_rate": 200.00,
"change": 1.00,
"change_pct": 0.50
}
},
"unit": "per troy ounce"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for LKR over a specific time period:
{
"success": true,
"timestamp": 1785233280,
"base": "USD",
"date": "2026-07-28",
"rates": {
"LKR": {
"open": 199.50,
"high": 200.50,
"low": 198.00,
"close": 200.00
}
},
"unit": "per troy ounce"
}
Bid/Ask Endpoint
Get current bid and ask prices for LKR:
{
"success": true,
"timestamp": 1785233280,
"base": "USD",
"date": "2026-07-28",
"rates": {
"LKR": {
"bid": 199.00,
"ask": 200.00,
"spread": 1.00
}
},
"unit": "per troy ounce"
}
Conclusion
In conclusion, accessing historical rates for the Sri Lankan Rupee (LKR) has never been easier with the Metals-API. By leveraging its various endpoints, developers can obtain real-time and historical data, perform conversions, and analyze fluctuations. The API's comprehensive documentation and support for a wide range of symbols make it an invaluable resource for anyone involved in financial analysis or trading.
For further exploration, consider visiting the Metals-API Documentation for detailed guidance on implementation, or check the Metals-API Supported Symbols page to familiarize yourself with available currencies. The Metals-API Website also provides additional resources and updates on new features.
By understanding the capabilities of the Metals-API, developers can harness the power of data to create innovative applications that meet the demands of today's financial markets.