Introduction
In the rapidly evolving world of fintech, access to accurate and timely interest rate data is crucial for developers, economists, and financial analysts. The Interest Rates API from interestratesapi.com provides a comprehensive solution for integrating various interest rate data, including central bank rates, interbank rates, and historical financial time series. This guide focuses on integrating the Magyar Nemzeti Bank (MNB) Base Rate into your applications, detailing the API's capabilities, endpoints, and practical implementation strategies.
Understanding the Importance of Interest Rate Data
Interest rates play a pivotal role in the financial ecosystem, influencing everything from loan costs to investment decisions. Without access to reliable data, developers face significant challenges, including:
- Inability to provide accurate financial forecasts and analyses.
- Difficulty in making informed decisions regarding lending and borrowing.
- Challenges in developing competitive financial products.
The Interest Rates API addresses these challenges by offering a robust set of endpoints that allow users to access real-time and historical interest rate data efficiently.
API Overview
The Interest Rates API is designed to be straightforward and developer-friendly. It uses a simple GET method for all requests, ensuring ease of integration. Authentication is handled via the api_key query parameter, which must be appended to each request URL. The base URL for all API requests is:
https://interestratesapi.com/api/v1/
In this guide, we will cover the following endpoints:
/symbols/latest/historical/timeseries/fluctuation/ohlc/convert
1. Fetching Available Symbols
The first step in integrating the MNB Base Rate is to retrieve the available symbols. This can be done using the /symbols endpoint. This endpoint provides a catalogue of all available rate symbols, allowing developers to confirm the symbols they can use in their requests.
Endpoint Details
To fetch the available symbols, use the following cURL command:
curl "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=HUF&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"count": 1,
"symbols": [
{
"symbol": "MNB_BASE_RATE",
"name": "Magyar Nemzeti Bank Base Rate",
"category": "central_bank",
"country_code": "HU",
"currency_code": "HUF",
"frequency": "monthly",
"description": "The interest rate set by the Magyar Nemzeti Bank."
}
]
}
Response Fields Explained
- success: Indicates whether the request was successful.
- count: The number of symbols returned.
- symbols: An array containing details about each symbol, including:
- symbol: The identifier for the interest rate.
- name: The full name of the interest rate.
- category: The category of the rate (e.g., central bank).
- country_code: The ISO code for the country.
- currency_code: The currency in which the rate is denominated.
- frequency: How often the rate is updated.
- description: A brief description of the rate.
2. Retrieving the Latest MNB Base Rate
Once you have confirmed the symbol for the MNB Base Rate, the next step is to retrieve its latest value using the /latest endpoint. This endpoint provides the most recent interest rate data for specified symbols.
Endpoint Details
To get the latest MNB Base Rate, use the following cURL command:
curl "https://interestratesapi.com/api/v1/latest?symbols=MNB_BASE_RATE&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"date": "2026-05-30",
"base": "HUF",
"rates": {
"MNB_BASE_RATE": 5.33
},
"dates": {
"MNB_BASE_RATE": "2026-05-30"
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- date: The date of the latest rate data.
- base: The currency in which the rate is denominated.
- rates: An object containing the latest rates for the requested symbols.
- MNB_BASE_RATE: The latest value of the MNB Base Rate.
- dates: An object mapping symbols to their respective latest data dates.
- currencies: An object mapping symbols to their respective currency codes.
3. Accessing Historical Data
To analyze trends over time, you may need to access historical data for the MNB Base Rate. The /historical endpoint allows you to retrieve the interest rate for a specific date.
Endpoint Details
To fetch historical data for a specific date, use the following cURL command:
curl "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"date": "2025-06-15",
"base": "HUF",
"rates": {
"MNB_BASE_RATE": 5.33
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- date: The date for which the historical rate is requested.
- base: The currency in which the rate is denominated.
- rates: An object containing the historical rates for the requested symbols.
- MNB_BASE_RATE: The historical value of the MNB Base Rate.
- currencies: An object mapping symbols to their respective currency codes.
4. Analyzing Time Series Data
For a more comprehensive analysis, you may want to retrieve a series of rates over a specified date range. The /timeseries endpoint allows you to do just that.
Endpoint Details
To fetch a time series of the MNB Base Rate, use the following cURL command:
curl "https://interestratesapi.com/api/v1/timeseries?start=2025-05-30&end=2026-05-30&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"base": "HUF",
"start_date": "2025-05-30",
"end_date": "2026-05-30",
"rates": {
"MNB_BASE_RATE": {
"2025-01-02": 5.33,
"2025-01-03": 5.33,
"2025-01-06": 5.33
}
},
"frequencies": {
"MNB_BASE_RATE": "daily"
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- base: The currency in which the rate is denominated.
- start_date: The start date of the requested time series.
- end_date: The end date of the requested time series.
- rates: An object containing the rates for the requested symbols over the specified date range.
- MNB_BASE_RATE: An object mapping dates to their respective rates.
- frequencies: An object indicating the frequency of the rates.
- currencies: An object mapping symbols to their respective currency codes.
5. Evaluating Rate Fluctuations
Understanding how rates fluctuate over time is essential for financial analysis. The /fluctuation endpoint provides statistics on rate changes over a specified date range.
Endpoint Details
To analyze fluctuations in the MNB Base Rate, use the following cURL command:
curl "https://interestratesapi.com/api/v1/fluctuation?start=2025-05-30&end=2026-05-30&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"rates": {
"MNB_BASE_RATE": {
"start_date": "2025-05-30",
"end_date": "2026-05-30",
"start_value": 5.50,
"end_value": 5.33,
"change": -0.17,
"change_pct": -3.09,
"high": 5.50,
"low": 5.25
}
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- rates: An object containing fluctuation statistics for the requested symbols.
- MNB_BASE_RATE: An object containing:
- start_date: The start date of the analysis period.
- end_date: The end date of the analysis period.
- start_value: The rate at the start of the period.
- end_value: The rate at the end of the period.
- change: The absolute change in the rate.
- change_pct: The percentage change in the rate.
- high: The highest rate during the period.
- low: The lowest rate during the period.
6. Obtaining OHLC Data
For those interested in candlestick data, the /ohlc endpoint provides Open, High, Low, and Close (OHLC) data for the MNB Base Rate over a specified period.
Endpoint Details
To retrieve OHLC data, use the following cURL command:
curl "https://interestratesapi.com/api/v1/ohlc?symbols=MNB_BASE_RATE&period=monthly&start=2025-05-30&end=2026-05-30&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"period": "monthly",
"start_date": "2025-05-30",
"end_date": "2026-05-30",
"rates": {
"MNB_BASE_RATE": [
{
"period": "2025-01",
"open": 5.50,
"high": 5.50,
"low": 5.33,
"close": 5.33,
"data_points": 23
}
]
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- period: The frequency of the OHLC data (e.g., monthly).
- start_date: The start date of the requested OHLC data.
- end_date: The end date of the requested OHLC data.
- rates: An object containing OHLC data for the requested symbols.
- MNB_BASE_RATE: An array of objects, each representing a period with:
- period: The period for which the data is reported.
- open: The opening rate for the period.
- high: The highest rate during the period.
- low: The lowest rate during the period.
- close: The closing rate for the period.
- data_points: The number of data points used to calculate the OHLC values.
7. Comparing Loan Interest Costs
The /convert endpoint allows developers to compare the total interest cost of loans between different rates. This is particularly useful for financial applications that help users make informed borrowing decisions.
Endpoint Details
To compare the MNB Base Rate with another rate, use the following cURL command:
curl "https://interestratesapi.com/api/v1/convert?from=MNB_BASE_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"
Here’s a sample JSON response:
{
"success": true,
"amount": 100000,
"term_months": 12,
"from": {
"symbol": "MNB_BASE_RATE",
"rate": 5.33,
"date": "2026-05-30",
"total_interest": 5330.00,
"total_payment": 105330.00
},
"to": {
"symbol": "ECB_MRO",
"rate": 4.50,
"date": "2026-05-30",
"total_interest": 4500.00,
"total_payment": 104500.00
},
"difference": {
"rate_spread": 0.83,
"interest_saved": 830.00
}
}
Response Fields Explained
- success: Indicates whether the request was successful.
- amount: The principal amount of the loan.
- term_months: The duration of the loan in months.
- from: An object containing details about the first rate.
- symbol: The identifier for the interest rate.
- rate: The interest rate value.
- date: The date of the rate.
- total_interest: The total interest paid over the loan term.
- total_payment: The total amount paid over the loan term.
- to: An object containing details about the second rate (similar structure to from).
- difference: An object showing the difference between the two rates.
- rate_spread: The difference in rates.
- interest_saved: The amount saved by choosing the lower rate.
Error Handling
When working with APIs, it's essential to handle errors gracefully. The Interest Rates API can return several error codes, including:
- 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.
For error codes 401 and 403, ensure that your api_key is valid and that your account is active. For 404 errors, verify that the requested symbols and dates are correct. For 422 errors, check the format of your request parameters. For 429 errors, respect the rate limits and consider implementing a retry mechanism with exponential backoff.
Rate Limit Headers
The API provides rate limit headers that can help you manage your usage:
- 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.
Monitoring these headers can help you avoid hitting rate limits and ensure smooth operation of your application.
Mini Project: Node.js/Express Endpoint
To illustrate the practical application of the Interest Rates API, let's create a simple Node.js/Express endpoint that fetches, caches, and serves the MNB Base Rate data.
Setup
First, ensure you have Node.js and Express installed. Create a new project and install the necessary packages:
npm init -y
npm install express axios
Code Example
Here’s a basic implementation:
const express = require('express');
const axios = require('axios');
const app = express();
const PORT = process.env.PORT || 3000;
const API_KEY = 'YOUR_KEY';
const BASE_URL = 'https://interestratesapi.com/api/v1/latest?symbols=MNB_BASE_RATE&api_key=' + API_KEY;
app.get('/mnb-rate', async (req, res) => {
try {
const response = await axios.get(BASE_URL);
res.json(response.data);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch data' });
}
});
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
This endpoint fetches the latest MNB Base Rate and serves it as JSON. You can enhance this implementation by adding caching mechanisms and error handling as needed.
Conclusion
Integrating the MNB Base Rate into your fintech applications using the Interest Rates API from interestratesapi.com is a straightforward process. By leveraging the various endpoints, you can access real-time and historical interest rate data, analyze trends, and make informed financial decisions. For more information on the API and its features, visit Explore Interest Rates API features and Get started with Interest Rates API.




