Bank Indonesia Historical Data API: Timeseries, Charts & Downloads
The financial landscape is constantly evolving, and access to accurate and timely data is crucial for developers, economists, and financial analysts. The Bank Indonesia Historical Data API provides a robust solution for retrieving interest rate data, including central bank rates, interbank rates, and financial time series analysis. This blog post will delve into the features of the Interest Rates API, focusing on the BI_RATE, and how it can be leveraged for effective financial data analysis.
Understanding the Importance of Interest Rate Data
Interest rates are a fundamental component of the financial system, influencing everything from consumer loans to investment decisions. For developers building fintech applications, having access to reliable interest rate data is essential for creating accurate financial models and analytics tools. The Interest Rates API offers a comprehensive suite of endpoints that allow users to retrieve historical data, perform time series analysis, and visualize trends through charts.
Without such APIs, developers face significant challenges, including:
- Difficulty in accessing real-time and historical financial data.
- Increased time and resources spent on data collection and management.
- Inaccurate financial modeling due to outdated or incorrect data.
By utilizing the Interest Rates API, developers can streamline their data retrieval processes, ensuring they have the most accurate information at their fingertips.
API Overview and Key Features
The Interest Rates API is designed to provide users with a variety of endpoints for accessing interest rate data. Below are the key features and endpoints available:
- /api/v1/symbols: Retrieve a catalogue of available rate symbols.
- /api/v1/latest: Get the latest value per symbol.
- /api/v1/historical: Fetch the value on a specific date.
- /api/v1/timeseries: Retrieve a series of data between two dates.
- /api/v1/fluctuation: Analyze change statistics over a range.
- /api/v1/ohlc: Obtain OHLC candlestick data for visualization.
- /api/v1/convert: Compare loan interest costs between two rates.
Each endpoint serves a specific purpose, enabling users to access the data they need for various financial analyses.
Fetching Time Series Data with the /timeseries Endpoint
The /timeseries endpoint is particularly valuable for developers looking to analyze trends over time. This endpoint allows users to retrieve a series of interest rate data between two specified dates. The ability to fetch multi-year data is crucial for conducting thorough financial analyses.
To use the /timeseries endpoint, you need to specify the start and end dates, as well as the symbols you wish to retrieve. Here’s an example of how to make a request:
curl "https://interestratesapi.com/api/v1/timeseries?start=2025-07-15&end=2026-07-15&symbols=BI_RATE&api_key=YOUR_KEY"
The expected JSON response will look like this:
{
"success": true,
"base": "USD",
"start_date": "2025-07-15",
"end_date": "2026-07-15",
"rates": {
"BI_RATE": {
"2025-01-02": 5.33,
"2025-01-03": 5.33,
"2025-01-06": 5.33
}
},
"frequencies": {
"BI_RATE": "daily"
},
"currencies": {
"BI_RATE": "USD"
}
}
In this response:
- success: Indicates whether the request was successful.
- base: The base currency for the rates.
- start_date and end_date: The date range for the data.
- rates: Contains the interest rate data for the specified symbol.
- frequencies: Indicates the frequency of the data (e.g., daily).
- currencies: The currency associated with the rates.
Using this data, developers can create visualizations to analyze trends in the BI_RATE over time.
Point-in-Time Lookups with the /historical Endpoint
The /historical endpoint is essential for retrieving interest rate data for specific dates. This is particularly useful for financial analysts who need to understand historical trends and make comparisons against current rates.
To fetch historical data, you need to specify the date and the symbols you wish to retrieve. Here’s an example:
curl "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BI_RATE&api_key=YOUR_KEY"
The expected JSON response will look like this:
{
"success": true,
"date": "2025-06-15",
"base": "USD",
"rates": {
"BI_RATE": 5.33
},
"currencies": {
"BI_RATE": "USD"
}
}
In this response:
- date: The specific date for which the data is retrieved.
- rates: Contains the interest rate data for the specified symbol on that date.
This endpoint is particularly useful for analyzing the impact of historical events on interest rates.
Visualizing Data with the /ohlc Endpoint
For developers looking to create visual representations of interest rate data, the /ohlc endpoint provides OHLC (Open, High, Low, Close) candlestick data. This is particularly useful for financial analysts who want to visualize trends and fluctuations in interest rates.
To use the /ohlc endpoint, you need to specify the symbols and the desired period (monthly, weekly, or quarterly). Here’s an example:
curl "https://interestratesapi.com/api/v1/ohlc?symbols=BI_RATE&period=monthly&start=2025-07-15&end=2026-07-15&api_key=YOUR_KEY"
The expected JSON response will look like this:
{
"success": true,
"period": "monthly",
"start_date": "2025-07-15",
"end_date": "2026-07-15",
"rates": {
"BI_RATE": [
{
"period": "2025-01",
"open": 5.50,
"high": 5.50,
"low": 5.33,
"close": 5.33,
"data_points": 23
}
]
}
}
In this response:
- period: The time period for the OHLC data.
- open, high, low, close: The OHLC values for the specified period.
- data_points: The number of data points used to calculate the OHLC values.
Using this data, developers can create candlestick charts using libraries like Chart.js or Plotly. Here’s a simple example of how to integrate this data into a Chart.js chart:
const ctx = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(ctx, {
type: 'candlestick',
data: {
datasets: [{
label: 'BI_RATE',
data: [
{ x: '2025-01', o: 5.50, h: 5.50, l: 5.33, c: 5.33 }
]
}]
},
options: {
scales: {
x: {
type: 'time'
}
}
}
});
Building a Data Pipeline with Python
For data engineers and analysts, building a data pipeline to fetch, process, and store interest rate data can be invaluable. Below is an example of how to use Python to fetch BI_RATE data, convert it into a Pandas DataFrame, and export it to CSV or Parquet format.
import requests
import pandas as pd
# Fetching data
response = requests.get(
'https://interestratesapi.com/api/v1/timeseries',
params=dict(start='2025-07-15', end='2026-07-15', symbols='BI_RATE', api_key='YOUR_KEY')
)
data = response.json()
# Processing data
dates = list(data['rates']['BI_RATE'].keys())
values = list(data['rates']['BI_RATE'].values())
df = pd.DataFrame({'Date': dates, 'BI_RATE': values})
# Exporting to CSV
df.to_csv('bi_rate_data.csv', index=False)
# Exporting to Parquet
df.to_parquet('bi_rate_data.parquet', index=False)
This pipeline allows users to automate the retrieval and storage of interest rate data, making it easier to conduct analyses and generate reports.
Common Pitfalls in Time Series Analysis
When working with time series data, developers should be aware of several common pitfalls:
- Missing Dates: Ensure that your analysis accounts for weekends and holidays when data may not be available.
- Frequency Considerations: Understand the implications of using daily versus monthly data, as this can affect the interpretation of trends.
- Data Points Interpretation: Be mindful of the number of data points used to calculate averages or OHLC values, as this can impact the reliability of your analysis.
By being aware of these issues, developers can create more robust financial models and analyses.
Conclusion
The Bank Indonesia Historical Data API is a powerful tool for accessing interest rate data, enabling developers and analysts to conduct thorough financial analyses. With endpoints for retrieving time series data, historical values, and OHLC data, users can gain valuable insights into interest rate trends and make informed decisions.
To get started with the Interest Rates API, visit Try Interest Rates API and explore the various features available. Whether you are building a fintech application or conducting economic research, the Interest Rates API provides the data you need to succeed.
For more information on how to leverage the capabilities of the Interest Rates API, check out Explore Interest Rates API features and Get started with Interest Rates API.




