In the rapidly evolving world of finance, access to accurate and timely interest rate data is crucial for developers, economists, and financial analysts. The ability to integrate central bank rates, interbank rates, and historical financial data into applications can significantly enhance decision-making processes and financial modeling. This blog post serves as a comprehensive guide for integrating BANREP data from Interest Rates API into your applications. We will cover the essential endpoints, provide code examples, and discuss best practices for utilizing this valuable data.
Understanding the Importance of Interest Rate Data
Interest rates are a fundamental aspect of the financial ecosystem, influencing everything from loan costs to investment returns. For developers building fintech applications, having access to reliable interest rate data is essential for creating tools that help users make informed financial decisions. The Interest Rates API provides a robust solution for accessing various interest rates, including the BANREP_RATE, which is the central bank rate set by Banco de la República de Colombia.
Getting Started with the Interest Rates API
Before diving into the integration process, it’s important to understand the structure of the Interest Rates API. The base URL for all API requests is:
https://interestratesapi.com/api/v1/
All requests to the API must use the GET method, and authentication is handled through the api_key query parameter. This guide will walk you through the integration of the BANREP_RATE data, covering all seven endpoints available in the API.
1. Fetching Available Symbols
The first step in integrating the BANREP_RATE is to retrieve the available symbols from the API. This can be done using the /symbols endpoint.
Endpoint: GET /api/v1/symbols
This endpoint provides a catalogue of available rate symbols, allowing you to filter by category, base currency, or provider.
cURL Example:
curl "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=COP&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"count": 1,
"symbols": [
{
"symbol": "BANREP_RATE",
"name": "Banco de la República Colombia Rate",
"category": "central_bank",
"country_code": "CO",
"currency_code": "COP",
"frequency": "monthly",
"description": "The interest rate set by the central bank of Colombia."
}
]
}
This response indicates that the BANREP_RATE is available for use, along with its description and other relevant details.
2. Retrieving the Latest Rate
Once you have confirmed the availability of the BANREP_RATE, the next step is to retrieve the latest rate using the /latest endpoint.
Endpoint: GET /api/v1/latest
This endpoint returns the most recent value for the specified symbols.
cURL Example:
curl "https://interestratesapi.com/api/v1/latest?symbols=BANREP_RATE&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"date": "2026-05-29",
"base": "COP",
"rates": {
"BANREP_RATE": 5.33
},
"currencies": {
"BANREP_RATE": "COP"
}
}
This response provides the latest BANREP_RATE, which is essential for applications that require up-to-date interest rate information.
3. Accessing Historical Data
For applications that need to analyze trends over time, accessing historical data is crucial. The /historical endpoint allows you to retrieve the rate for a specific date.
Endpoint: GET /api/v1/historical
This endpoint requires a date parameter and can optionally accept symbols and base currency filters.
cURL Example:
curl "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BANREP_RATE&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"date": "2025-06-15",
"base": "COP",
"rates": {
"BANREP_RATE": 5.33
},
"currencies": {
"BANREP_RATE": "COP"
}
}
This response provides the BANREP_RATE for the specified date, allowing for historical analysis and trend identification.
4. Analyzing Time Series Data
To analyze the BANREP_RATE over a range of dates, the /timeseries endpoint can be utilized. This is particularly useful for financial modeling and forecasting.
Endpoint: GET /api/v1/timeseries
This endpoint requires a start date, an end date, and the symbols you wish to analyze.
cURL Example:
curl "https://interestratesapi.com/api/v1/timeseries?start=2025-05-29&end=2026-05-29&symbols=BANREP_RATE&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"base": "COP",
"start_date": "2025-05-29",
"end_date": "2026-05-29",
"rates": {
"BANREP_RATE": {
"2025-01-02": 5.33,
"2025-01-03": 5.33,
"2025-01-06": 5.33
}
},
"frequencies": {
"BANREP_RATE": "daily"
},
"currencies": {
"BANREP_RATE": "COP"
}
}
This response provides a time series of the BANREP_RATE, which can be used for detailed financial analysis.
5. Evaluating Rate Fluctuations
Understanding how rates fluctuate over time is essential for risk management and financial planning. The /fluctuation endpoint provides change statistics over a specified date range.
Endpoint: GET /api/v1/fluctuation
This endpoint requires a start date, an end date, and the symbols you wish to analyze.
cURL Example:
curl "https://interestratesapi.com/api/v1/fluctuation?start=2025-05-29&end=2026-05-29&symbols=BANREP_RATE&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"rates": {
"BANREP_RATE": {
"start_date": "2025-05-29",
"end_date": "2026-05-29",
"start_value": 5.50,
"end_value": 5.33,
"change": -0.17,
"change_pct": -3.09,
"high": 5.50,
"low": 5.25
}
}
}
This response provides valuable insights into the fluctuations of the BANREP_RATE, which can inform investment strategies and risk assessments.
6. Obtaining OHLC Data
For applications that require candlestick data, the /ohlc endpoint provides open, high, low, and close data for the specified symbols.
Endpoint: GET /api/v1/ohlc
This endpoint requires the symbols you wish to analyze and can optionally accept a period and date range.
cURL Example:
curl "https://interestratesapi.com/api/v1/ohlc?symbols=BANREP_RATE&period=monthly&start=2025-05-29&end=2026-05-29&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"period": "monthly",
"start_date": "2025-05-29",
"end_date": "2026-05-29",
"rates": {
"BANREP_RATE": [
{
"period": "2025-01",
"open": 5.50,
"high": 5.50,
"low": 5.33,
"close": 5.33,
"data_points": 23
}
]
}
}
This response provides OHLC data for the BANREP_RATE, which is essential for technical analysis in trading applications.
7. Comparing Loan Interest Costs
Finally, the /convert endpoint allows you to compare the total interest cost of loans between two rates, which is valuable for financial decision-making.
Endpoint: GET /api/v1/convert
This endpoint requires the from and to symbols, as well as the loan amount and optional term in months.
cURL Example:
curl "https://interestratesapi.com/api/v1/convert?from=BANREP_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"
JSON Response Example:
{
"success": true,
"amount": 100000,
"term_months": 12,
"from": {
"symbol": "BANREP_RATE",
"rate": 5.33,
"total_interest": 5330.00,
"total_payment": 105330.00
},
"to": {
"symbol": "ECB_MRO",
"rate": 4.50,
"total_interest": 4500.00,
"total_payment": 104500.00
},
"difference": {
"rate_spread": 0.83,
"interest_saved": 830.00
}
}
This response provides a detailed comparison of loan costs between the BANREP_RATE and another rate, helping users make informed financial decisions.
Error Handling and Rate Limits
When working with the Interest Rates API, it is essential to handle errors gracefully. Common error responses include:
- 401: Missing or invalid
api_key. - 403: Account without an active plan.
- 404: No symbols matched or no data for the requested date/range.
- 422: Validation error (e.g., wrong date format, invalid symbol).
- 429: Request quota exhausted.
Additionally, the API provides rate limit headers:
- X-RateLimit-Limit: The maximum number of requests allowed in a given time period.
- X-RateLimit-Remaining: The number of requests remaining in the current time period.
- X-RateLimit-Reset: The time when the rate limit will reset.
Building a Mini Project with Node.js
To demonstrate the practical application of the BANREP_RATE data, let's create a simple Node.js/Express application that fetches, caches, and serves the BANREP_RATE data.
Setting Up the Project
First, ensure you have Node.js and npm installed. Create a new directory for your project and initialize it:
mkdir banrep-rate-app
cd banrep-rate-app
npm init -y
Next, install the required dependencies:
npm install express axios node-cache
Creating the Server
Create a file named server.js and add the following code:
const express = require('express');
const axios = require('axios');
const NodeCache = require('node-cache');
const app = express();
const cache = new NodeCache();
const API_KEY = 'YOUR_KEY';
const BASE_URL = 'https://interestratesapi.com/api/v1/latest?symbols=BANREP_RATE&api_key=' + API_KEY;
app.get('/banrep-rate', async (req, res) => {
const cachedRate = cache.get('banrepRate');
if (cachedRate) {
return res.json(cachedRate);
}
try {
const response = await axios.get(BASE_URL);
cache.set('banrepRate', response.data, 3600); // Cache for 1 hour
res.json(response.data);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch BANREP_RATE' });
}
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
This simple Express server fetches the latest BANREP_RATE from the Interest Rates API and caches the result for one hour, reducing the number of API calls and improving performance.
Conclusion
Integrating BANREP data into your applications using the Interest Rates API is a straightforward process that can significantly enhance your financial applications. By leveraging the various endpoints available, you can access the latest rates, historical data, and perform detailed analyses to support informed decision-making. Whether you are building a fintech application, conducting economic research, or developing financial models, the Interest Rates API provides the necessary tools to succeed.
For more information and to get started with the Interest Rates API, visit their official website and explore the features available to you.




