MNB Historical Data API: Timeseries, Charts & Downloads

MNB Historical Data API: Timeseries, Charts & Downloads

Understanding the Importance of Interest Rate Data

In the world of finance, accurate and timely interest rate data is crucial for a variety of stakeholders, including developers building fintech applications, economists, quantitative analysts, and financial data engineers. Interest rates influence economic activity, investment decisions, and monetary policy. The ability to access historical and current interest rate data allows these professionals to make informed decisions, conduct thorough analyses, and develop robust financial models.

This blog post will explore the capabilities of the Interest Rates API, focusing specifically on the Magyar Nemzeti Bank (MNB) Base Rate. We will delve into various endpoints that facilitate the retrieval of interest rate data, including time series analysis, historical data retrieval, and data visualization techniques.

Getting Started with the Interest Rates API

The Interest Rates API provides a comprehensive suite of endpoints that allow users to access a wide range of interest rate data. The base URL for all API requests is:

https://interestratesapi.com/api/v1/

All requests to the API utilize the GET method, and authentication is handled through the api_key query parameter. For example:

https://interestratesapi.com/api/v1/latest?api_key=YOUR_KEY

Exploring the Available Symbols

The first step in utilizing the Interest Rates API is to explore the available symbols. The /symbols endpoint provides a catalogue of interest rate symbols, including the MNB Base Rate.

Endpoint: GET /api/v1/symbols

This endpoint allows users to filter symbols based on various criteria such as currency, category, and provider. Here’s how to make a request:

curl "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=HUF&api_key=YOUR_KEY"

Example 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."
}
]
}

This response indicates that the MNB Base Rate is available for use in subsequent API calls.

Retrieving Latest Interest Rates

Once you have identified the symbols you wish to work with, the next step is to retrieve the latest interest rates. The /latest endpoint provides the most recent values for specified symbols.

Endpoint: GET /api/v1/latest

To fetch the latest rates for the MNB Base Rate, you can use the following request:

curl "https://interestratesapi.com/api/v1/latest?symbols=MNB_BASE_RATE&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"date": "2026-06-23",
"base": "HUF",
"rates": {
"MNB_BASE_RATE": 5.33
},
"dates": {
"MNB_BASE_RATE": "2026-06-23"
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}

This response provides the latest MNB Base Rate, which is essential for real-time financial analysis and decision-making.

Historical Data Retrieval

For many financial analyses, accessing historical data is critical. The /historical endpoint allows users to retrieve the interest rate for a specific date.

Endpoint: GET /api/v1/historical

To get the MNB Base Rate for a specific date, you can use the following request:

curl "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"date": "2025-06-15",
"base": "HUF",
"rates": {
"MNB_BASE_RATE": 5.25
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}

This endpoint is particularly useful for economists and analysts who need to analyze trends over time or assess the impact of historical interest rates on economic conditions.

Time Series Data Analysis

For a more comprehensive analysis, the /timeseries endpoint allows users to retrieve a series of interest rates between two dates. This is particularly useful for visualizing trends and conducting time series analysis.

Endpoint: GET /api/v1/timeseries

To fetch a time series of the MNB Base Rate, you can use the following request:

curl "https://interestratesapi.com/api/v1/timeseries?start=2025-01-01&end=2026-01-01&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"base": "HUF",
"start_date": "2025-01-01",
"end_date": "2026-01-01",
"rates": {
"MNB_BASE_RATE": {
"2025-01-02": 5.30,
"2025-01-03": 5.32,
"2025-01-04": 5.31
}
},
"frequencies": {
"MNB_BASE_RATE": "daily"
},
"currencies": {
"MNB_BASE_RATE": "HUF"
}
}

This data can be used to create visualizations, such as line charts, to illustrate trends in the MNB Base Rate over time.

Visualizing Data with OHLC Candlestick Charts

For those interested in visualizing interest rate data, the /ohlc endpoint provides Open-High-Low-Close (OHLC) data, which is essential for creating candlestick charts.

Endpoint: GET /api/v1/ohlc

To retrieve OHLC data for the MNB Base Rate, you can use the following request:

curl "https://interestratesapi.com/api/v1/ohlc?symbols=MNB_BASE_RATE&period=monthly&start=2025-01-01&end=2026-01-01&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"period": "monthly",
"start_date": "2025-01-01",
"end_date": "2026-01-01",
"rates": {
"MNB_BASE_RATE": [
{
"period": "2025-01",
"open": 5.30,
"high": 5.35,
"low": 5.25,
"close": 5.33,
"data_points": 23
}
]
}
}

This data can be used in conjunction with libraries like Chart.js or Plotly to create interactive visualizations that help stakeholders understand trends and fluctuations in interest rates.

Analyzing Rate Fluctuations

The /fluctuation endpoint allows users to analyze changes in interest rates over a specified period. This is particularly useful for understanding volatility and making informed predictions.

Endpoint: GET /api/v1/fluctuation

To analyze fluctuations in the MNB Base Rate, you can use the following request:

curl "https://interestratesapi.com/api/v1/fluctuation?start=2025-01-01&end=2026-01-01&symbols=MNB_BASE_RATE&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"rates": {
"MNB_BASE_RATE": {
"start_date": "2025-01-01",
"end_date": "2026-01-01",
"start_value": 5.30,
"end_value": 5.33,
"change": 0.03,
"change_pct": 0.56,
"high": 5.35,
"low": 5.25
}
}
}

This endpoint provides valuable insights into the behavior of interest rates, allowing analysts to assess risk and make strategic decisions.

Loan Interest Cost Comparison

The /convert endpoint allows users to compare the total interest cost of loans between different interest rates. This is particularly useful for financial institutions and borrowers looking to make informed decisions about loans.

Endpoint: GET /api/v1/convert

To compare the interest costs between the MNB Base Rate and another rate, you can use the following request:

curl "https://interestratesapi.com/api/v1/convert?from=MNB_BASE_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"

Example JSON response:

{
"success": true,
"amount": 100000,
"term_months": 12,
"from": {
"symbol": "MNB_BASE_RATE",
"rate": 5.33,
"date": "2026-06-23",
"total_interest": 5330.00,
"total_payment": 105330.00
},
"to": {
"symbol": "ECB_MRO",
"rate": 4.50,
"date": "2026-06-23",
"total_interest": 4500.00,
"total_payment": 104500.00
},
"difference": {
"rate_spread": 0.83,
"interest_saved": 830.00
}
}

This endpoint provides a clear comparison of loan costs, helping borrowers make informed decisions about their financing options.

Building a Data Pipeline with Python

For developers looking to integrate the Interest Rates API into their applications, building a data pipeline using Python can streamline the process of fetching, analyzing, and exporting interest rate data.

Example Python Code

The following Python code demonstrates how to fetch the MNB Base Rate, store it in a pandas DataFrame, and export it to a CSV file:

import requests
import pandas as pd

# Fetch latest MNB Base Rate
response = requests.get(
'https://interestratesapi.com/api/v1/latest',
params=dict(symbols='MNB_BASE_RATE', api_key='YOUR_KEY')
)

data = response.json()

# Create DataFrame
df = pd.DataFrame(data['rates'], index=[data['date']])

# Export to CSV
df.to_csv('mnb_base_rate.csv')

This code snippet provides a practical example of how to automate the retrieval and storage of interest rate data, making it easier for developers to integrate this information into their applications.

Common Pitfalls in Time Series Analysis

When working with time series data, there are several common pitfalls that developers and analysts should be aware of:

  • Missing Dates: Ensure that your data covers all relevant dates, especially when analyzing monthly symbols.
  • Frequency Considerations: Be mindful of the frequency of your data (daily vs. monthly) and how it impacts your analysis.
  • Data Points Interpretation: Understand how data points are calculated and what they represent in the context of your analysis.

By being aware of these pitfalls, analysts can avoid common mistakes and ensure that their analyses are accurate and meaningful.

Conclusion

The Interest Rates API provides a powerful toolset for accessing and analyzing interest rate data, particularly the MNB Base Rate. By leveraging the various endpoints available, developers and analysts can retrieve real-time and historical data, conduct thorough analyses, and visualize trends effectively.

Whether you are building a fintech application, conducting economic research, or analyzing financial data, the Interest Rates API offers the capabilities you need to succeed. Start exploring the API today and unlock the potential of interest rate data for your projects.

For more information, visit Explore Interest Rates API features and Get started with Interest Rates API.

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key

Related posts