Introduction
In the world of finance, understanding interest rates is crucial for making informed decisions, especially when it comes to loans. For businesses and individuals alike, comparing loan costs across different interest rate benchmarks can lead to significant savings. This blog post will focus on the SELIC (Sistema Especial de Liquidação e de Custódia) rate in Brazil and how it can be compared with other central bank rates using the Interest Rates API. We will explore the API's capabilities, particularly the /convert endpoint, which allows users to calculate interest savings when comparing different loan rates.
Understanding the SELIC Rate
The SELIC rate is Brazil's primary interest rate, set by the Central Bank of Brazil. It serves as a benchmark for various financial products, including loans and mortgages. The SELIC rate influences the economy by affecting inflation and economic growth. For developers building fintech applications, understanding how to access and utilize this data is essential for creating effective financial tools.
Using the Interest Rates API, developers can easily retrieve the latest SELIC rate and compare it with other rates, such as the ECB MRO (European Central Bank Main Refinancing Operations Rate) or the BOE Bank Rate (Bank of England). This comparison can help users make better financial decisions regarding loans.
Using the /convert Endpoint
The /convert endpoint of the Interest Rates API is designed to compare the total interest cost of a loan at different interest rates. This is particularly useful for borrowers looking to understand how much they can save by choosing one rate over another. The endpoint requires the following parameters:
- from: The symbol of the starting interest rate (e.g., SELIC).
- to: The symbol of the target interest rate (e.g., ECB_MRO).
- amount: The loan amount (numeric, >= 0).
- term_months: The loan term in months (default is 12).
Here’s an example of how to use the /convert endpoint to compare the SELIC rate with the ECB MRO rate:
curl "https://interestratesapi.com/api/v1/convert?from=SELIC&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"
The response will provide detailed information about the total interest cost and payments for both rates, allowing users to see the difference in costs clearly.
Response Fields Explained
The response from the /convert endpoint includes several important fields:
- amount: The principal amount of the loan.
- term_months: The duration of the loan in months.
- from: An object containing details about the starting rate, including:
- symbol: The identifier for the rate (e.g., SELIC).
- rate: The current interest rate.
- total_interest: The total interest paid over the loan term.
- total_payment: The total amount paid back, including principal and interest.
- to: An object containing details about the target rate, similar to the "from" object.
- difference: An object showing the difference between the two rates, including:
- rate_spread: The difference in interest rates.
- interest_saved: The amount saved by choosing the lower rate.
Understanding these fields allows developers to create applications that provide users with clear insights into their loan options.
Practical Use Cases
There are numerous scenarios where the /convert endpoint can be beneficial:
- Mortgage Comparison Tools: Users can compare the SELIC rate with other rates to determine the best mortgage option available.
- Interbank Lending Cost Analysis: Financial institutions can analyze the cost of borrowing between different rates to optimize their lending strategies.
- Fintech Lending Applications: Developers can integrate the API into their applications to provide users with real-time comparisons of loan costs, enhancing user experience and decision-making.
Implementing the /convert Endpoint
To effectively utilize the /convert endpoint, developers can create reusable functions in various programming languages. Below are examples in Python and JavaScript:
Python Example
import requests
def compare_interest_rates(from_rate, to_rate, amount, term_months, api_key):
response = requests.get(
'https://interestratesapi.com/api/v1/convert',
params=dict(from=from_rate, to=to_rate, amount=amount, term_months=term_months, api_key=api_key)
)
return response.json()
# Example usage
result = compare_interest_rates('SELIC', 'ECB_MRO', 100000, 12, 'YOUR_KEY')
print(result)
JavaScript Example
async function compareInterestRates(fromRate, toRate, amount, termMonths, apiKey) {
const response = await fetch(
`https://interestratesapi.com/api/v1/convert?from=${fromRate}&to=${toRate}&amount=${amount}&term_months=${termMonths}&api_key=${apiKey}`
);
const data = await response.json();
return data;
}
// Example usage
compareInterestRates('SELIC', 'ECB_MRO', 100000, 12, 'YOUR_KEY').then(console.log);
Retrieving the Latest SELIC Rate
Before making comparisons, it is essential to retrieve the latest SELIC rate. This can be done using the /latest endpoint:
curl "https://interestratesapi.com/api/v1/latest?symbols=SELIC&api_key=YOUR_KEY"
The response will provide the current SELIC rate, which can then be used in the /convert endpoint for accurate comparisons.
Latest Rate Response Example
{
"success": true,
"date": "2026-07-15",
"base": "MIXED",
"rates": {
"SELIC": 5.33
},
"dates": {
"SELIC": "2026-07-15"
},
"currencies": {
"SELIC": "USD"
}
}
Conclusion
In conclusion, the Interest Rates API provides a powerful tool for comparing loan costs across different interest rates, particularly the SELIC rate in Brazil. By utilizing the /convert endpoint, developers can create applications that help users make informed financial decisions. The ability to retrieve the latest rates and perform comparisons in real-time adds significant value to fintech applications, mortgage comparison tools, and interbank lending analyses.
For developers looking to enhance their applications with interest rate data, the Interest Rates API is an invaluable resource. Start building your financial tools today and leverage the power of real-time interest rate comparisons.
To explore more features and capabilities, visit Explore Interest Rates API features and Get started with Interest Rates API.




