You need the Bank Indonesia policy rate inside your software to price loans, build dashboards, and run risk models. By the end of this guide, you will query BI_RATE from interestratesapi.com, read effective dates correctly, stream historical series, compute fluctuations and OHLC, and programmatically compare loan costs and spreads—using only GET requests with api_key authentication.
What BI_RATE Represents and How It’s Expressed
BI_RATE is the Bank Indonesia (BI) policy rate exposed by the Interest Rates API under the symbol BI_RATE. It is a central bank benchmark for Indonesia and is delivered as a percentage rate (e.g., 5.75) rather than a decimal (0.0575). The symbol is monthly, meaning the effective value generally reflects the last available observation within a given month.
Key details you will rely on:
- Symbol: BI_RATE
- Category: central_bank
- Currency code: IDR
- Frequency: monthly (effective date typically aligns with the month’s last available data point)
Reading dates: For monthly symbols, when you query a single date, the API returns the value for the last day with data in that month. For timeseries, you may observe repeated values across business days within the month; use the dates map (when provided) or the daily keys in series to align analytics with effective periods.
All endpoints are under https://interestratesapi.com/api/v1/ and require GET with an api_key query parameter. You can learn more about the platform at https://interestratesapi.com and browse multi-capability documentation at the MCP. When you’re ready to integrate, Register to obtain an API key.
Authentication and Request Rules
Every call is a GET request to https://interestratesapi.com/api/v1/… and must include your key as a query parameter: ?api_key=YOUR_API_KEY. Do not send API keys in headers; do not use POST/PUT/DELETE. For production, keep keys out of client-side code and vault them server-side.
Endpoint 1: /symbols — Discover BI_RATE in the Catalogue
Use /symbols to verify BI_RATE is available and to inspect metadata like category, currency, and frequency. You can filter by category=central_bank and base=IDR if needed.
cURL
curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=BI_RATE"
Python (requests)
import requests
resp = requests.get(
"https://interestratesapi.com/api/v1/symbols",
params={"category": "central_bank", "base": "IDR", "api_key": "YOUR_API_KEY"}
)
data = resp.json()
print(data.get("success"), data.get("count"))
# Iterate to find BI_RATE in data["symbols"]
JavaScript (fetch)
const url = "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=IDR&api_key=YOUR_API_KEY";
const response = await fetch(url);
const data = await response.json();
// Look for an entry where symbol === "BI_RATE"
PHP
<?php
$url = "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=IDR&api_key=YOUR_API_KEY";
$json = file_get_contents($url);
$data = json_decode($json, true);
if ($data["success"]) {
foreach ($data["symbols"] as $sym) {
if ($sym["symbol"] === "BI_RATE") {
// Found BI_RATE
}
}
}
?>
Sample JSON Response (from docs)
{
"success": true,
"date": "2026-10-31",
"base": "IDR",
"rates": {
"BI_RATE": 5.75
},
"dates": {
"BI_RATE": "2026-10-31"
},
"currencies": {
"BI_RATE": "IDR"
},
"base_filter_note": null
}
Note: This example illustrates the response shape and fields (success, count, and an array of symbol metadata). For BI_RATE, expect category=central_bank, currency_code=IDR, and frequency=monthly.
Endpoint 2: /latest — Get the Latest BI_RATE
The /latest endpoint returns current values and includes maps with per-symbol dates and currencies. For BI_RATE, interpret the rate as a percentage. The date corresponds to the latest effective observation.
Required Official cURL (copy verbatim)
Official JSON (copy verbatim)
How to read it:
- rates.BI_RATE is the numeric rate as a percent (5.75 means 5.75%).
- dates.BI_RATE shows the effective date for the BI_RATE entry.
- currencies.BI_RATE confirms the currency context: IDR for Indonesia.
Python (requests) example using /latest
import requests
resp = requests.get(
"https://interestratesapi.com/api/v1/latest",
params={"symbols": "BI_RATE", "api_key": "YOUR_API_KEY"}
)
data = resp.json()
bi_rate = data["rates"]["BI_RATE"]
effective_date = data["dates"]["BI_RATE"]
currency = data["currencies"]["BI_RATE"]
print(f"BI_RATE={bi_rate}% as of {effective_date} ({currency})")
JavaScript (fetch) example using /latest
const response = await fetch(
"https://interestratesapi.com/api/v1/latest?symbols=BI_RATE&api_key=YOUR_API_KEY"
);
const data = await response.json();
const biRate = data.rates.BI_RATE;
const effectiveDate = data.dates.BI_RATE;
const currency = data.currencies.BI_RATE;
console.log(`BI_RATE=${biRate}% as of ${effectiveDate} (${currency})`);
PHP example using /latest
<?php
$url = "https://interestratesapi.com/api/v1/latest?symbols=BI_RATE&api_key=YOUR_API_KEY";
$json = file_get_contents($url);
$data = json_decode($json, true);
$rate = $data["rates"]["BI_RATE"];
$date = $data["dates"]["BI_RATE"];
$ccy = $data["currencies"]["BI_RATE"];
echo "BI_RATE={$rate}% as of {$date} ({$ccy})";
?>
Endpoint 3: /historical — BI_RATE on a Specific Date
Use /historical when you need the value as of a calendar date. For monthly BI_RATE, the API returns the month’s last available observation.
cURL
Python
import requests
params = {"date": "2025-06-15", "symbols": "BI_RATE", "api_key": "YOUR_API_KEY"}
resp = requests.get("https://interestratesapi.com/api/v1/historical", params=params)
data = resp.json()
# For monthly symbols, this is the last day with data in that month
print(data)
JavaScript
const url = "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BI_RATE&api_key=YOUR_API_KEY";
const res = await fetch(url);
const data = await res.json();
console.log(data.rates.BI_RATE);
PHP
<?php
$params = http_build_query([
"date" => "2025-06-15",
"symbols" => "BI_RATE",
"api_key" => "YOUR_API_KEY"
]);
$url = "https://interestratesapi.com/api/v1/historical?{$params}";
echo file_get_contents($url);
?>
JSON Response (from docs)
Fields you’ll use: rates map for the value, base and currencies for currency context. Note that for BI_RATE you should treat the value as a percent rate applicable to that month’s policy setting.
Endpoint 4: /timeseries — BI_RATE Over a Range
The /timeseries endpoint returns daily-indexed observations between start and end (inclusive). For monthly BI_RATE, values typically repeat across business days until a policy change occurs.
cURL
Python
import requests
params = {
"start": "2025-11-20",
"end": "2026-11-20",
"symbols": "BI_RATE",
"api_key": "YOUR_API_KEY"
}
resp = requests.get("https://interestratesapi.com/api/v1/timeseries", params=params)
series = resp.json()
bi_series = series["rates"]["BI_RATE"]
# bi_series is a dict keyed by YYYY-MM-DD -> rate
for d, v in list(bi_series.items())[:5]:
print(d, v)
JavaScript
const url = "https://interestratesapi.com/api/v1/timeseries?start=2025-11-20&end=2026-11-20&symbols=BI_RATE&api_key=YOUR_API_KEY";
const res = await fetch(url);
const data = await res.json();
const daily = data.rates.BI_RATE; // { "YYYY-MM-DD": value }
PHP
<?php
$params = http_build_query([
"start" => "2025-11-20",
"end" => "2026-11-20",
"symbols" => "BI_RATE",
"api_key" => "YOUR_API_KEY"
]);
$url = "https://interestratesapi.com/api/v1/timeseries?{$params}";
$json = file_get_contents($url);
$data = json_decode($json, true);
$daily = $data["rates"]["BI_RATE"];
// Iterate days as needed
?>
JSON Response (from docs)
The rates object contains per-day values. frequencies lets you confirm how the API indexed the series, and currencies gives the currency context. For analysis, resample to monthly by taking the last observation of each month, or join daily keys to your business calendar.
Endpoint 5: /fluctuation — Range Statistics for BI_RATE
Use /fluctuation to get start/end values and summary stats over a window. This is ideal for dashboards showing change, change_pct, high, and low without pulling the entire series.
cURL
Python
import requests
params = {
"start": "2025-11-20",
"end": "2026-11-20",
"symbols": "BI_RATE",
"api_key": "YOUR_API_KEY"
}
resp = requests.get("https://interestratesapi.com/api/v1/fluctuation", params=params)
stats = resp.json()["rates"]["BI_RATE"]
print(stats["change"], stats["change_pct"], stats["high"], stats["low"])
JavaScript
const url = "https://interestratesapi.com/api/v1/fluctuation?start=2025-11-20&end=2026-11-20&symbols=BI_RATE&api_key=YOUR_API_KEY";
const res = await fetch(url);
const data = await res.json();
const s = data.rates.BI_RATE;
console.log(s.start_value, s.end_value, s.change, s.change_pct);
PHP
<?php
$params = http_build_query([
"start" => "2025-11-20",
"end" => "2026-11-20",
"symbols" => "BI_RATE",
"api_key" => "YOUR_API_KEY"
]);
$url = "https://interestratesapi.com/api/v1/fluctuation?{$params}";
$json = file_get_contents($url);
$data = json_decode($json, true);
$s = $data["rates"]["BI_RATE"];
echo "Δ=" . $s["change"] . " (" . $s["change_pct"] . "%)";
?>
JSON Response (from docs)
Fields to note: change is expressed in percentage points; change_pct is relative to start_value. high and low are the extrema within the period.
Endpoint 6: /ohlc — Monthly OHLC for BI_RATE
OHLC is computed from the underlying daily series. For monthly BI_RATE, OHLC captures open (first day in the period), high, low, and close (last day in the period) with a count of contributing daily data_points.
cURL
Python
import requests
params = {
"symbols": "BI_RATE",
"period": "monthly",
"start": "2025-11-20",
"end": "2026-11-20",
"api_key": "YOUR_API_KEY"
}
resp = requests.get("https://interestratesapi.com/api/v1/ohlc", params=params)
ohlc = resp.json()["rates"]["BI_RATE"]
for bar in ohlc:
print(bar["period"], bar["open"], bar["high"], bar["low"], bar["close"], bar["data_points"])
JavaScript
const url = "https://interestratesapi.com/api/v1/ohlc?symbols=BI_RATE&period=monthly&start=2025-11-20&end=2026-11-20&api_key=YOUR_API_KEY";
const res = await fetch(url);
const data = await res.json();
const bars = data.rates.BI_RATE; // array of OHLC objects
PHP
<?php
$params = http_build_query([
"symbols" => "BI_RATE",
"period" => "monthly",
"start" => "2025-11-20",
"end" => "2026-11-20",
"api_key" => "YOUR_API_KEY"
]);
$url = "https://interestratesapi.com/api/v1/ohlc?{$params}";
$json = file_get_contents($url);
$data = json_decode($json, true);
$bars = $data["rates"]["BI_RATE"];
?>
JSON Response (from docs)
Use data_points to track bar quality; if you run analytics or charts, ensure your resampling logic aligns with business days and policy meeting dates.
Endpoint 7: /convert — Compare Loan Interest Costs Using BI_RATE
/convert compares the total interest cost for a simple loan using the latest rate of two symbols over a given term. This is useful when BI_RATE is a proxy for pricing versus another policy rate. The endpoint returns total_interest, total_payment, and a rate_spread and interest_saved summary.
cURL
Python
import requests
params = {
"from": "BI_RATE",
"to": "ECB_MRO",
"amount": 100000,
"term_months": 12,
"api_key": "YOUR_API_KEY"
}
resp = requests.get("https://interestratesapi.com/api/v1/convert", params=params)
comparison = resp.json()
print(comparison["from"]["rate"], comparison["to"]["rate"], comparison["difference"]["rate_spread"])
JavaScript
const url = "https://interestratesapi.com/api/v1/convert?from=BI_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY";
const res = await fetch(url);
const data = await res.json();
console.log(data.from.total_interest, data.to.total_interest, data.difference.rate_spread);
PHP
<?php
$params = http_build_query([
"from" => "BI_RATE",
"to" => "ECB_MRO",
"amount" => 100000,
"term_months" => 12,
"api_key" => "YOUR_API_KEY"
]);
$url = "https://interestratesapi.com/api/v1/convert?{$params}";
echo file_get_contents($url);
?>
JSON Response (from docs)
Use rate_spread to show the differential in percentage points between BI_RATE and the comparator. The totals are computed using the latest rate snapshots on the supplied date fields.
Practical Integration Notes for BI_RATE
Publication frequency and cadence: BI_RATE is monthly. You will often see a single change per month following BI policy decisions. The API will surface the latest effective value with a date in that month. If no new decision occurs, the value may persist into subsequent business days until the next update.
Business days: The service returns observations keyed to business days for time series. For monthly symbols, values may repeat across days within a month. When aggregating, use end-of-month for month-end reporting or the exact date in the dates map for event studies.
Caching: Because BI_RATE updates monthly, you can safely cache /latest and /historical results intra-day. For /timeseries, cache results for a given month and invalidate when a new policy decision is announced. Honor HTTP 429 rate limit headers (X-RateLimit-*) and back off according to Retry-After if present.
Units and interpretation: All interest rates are percentages. 5.75 means 5.75% per annum unless otherwise specified by the symbol. For BI_RATE specifically, treat the number as the policy rate level, not a compounded or daily accrual factor.
Computing Spreads and Monthly Payments from BI_RATE
Spreads: If you query two symbols via /latest (e.g., BI_RATE and ECB_MRO), compute a spread in percentage points as spread_pp = rate_A − rate_B. You can also use /convert which returns difference.rate_spread for the latest snapshot pair.
Monthly payment: If your product requires a nominal monthly rate from BI_RATE, derive r_monthly = BI_RATE / 12 / 100, then plug into loan formulas as needed. For example, for an amortizing loan with principal P, term n months, and monthly rate r, the payment M is M = P × r × (1 + r)^n / ((1 + r)^n − 1). Use the BI_RATE value returned by /latest or /historical to calculate r, without assuming any compounding beyond your own model requirements. Do not hard-code numbers; read the live BI_RATE from the API, then compute.
Error Handling and Rate Limits
Common error responses share the shape success=false with an error message (and sometimes a details field for 404s). Handle the following cases:
- 401: Missing or invalid api_key.
- 403: Account not authorized for data access.
- 404: No symbols matched or no data for date/range. details may include available ranges.
- 422: Validation error (e.g., malformed date, invalid symbol).
- 429: Quota exhausted. Inspect Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Implement retries with jitter for 429 and network timeouts. Normalize dates to YYYY-MM-DD.
End-to-End Examples You Can Ship
- Interest rate dashboard: Call /latest for BI_RATE and a few comparators (e.g., ECB_MRO), compute simple spreads, and visualize with /fluctuation stats.
- Risk model inputs: Pull /timeseries for BI_RATE to build factor histories or regression features; resample to month-end.
- Loan tools: Use /convert for a quick comparison widget; for custom amortization, compute payments from /latest.
- Macro research notebooks: Combine /historical (event dates) with /ohlc for quick regime-change visualization.
Explore additional capabilities and symbols at interestratesapi.com, or expand your integration via the Interest Rates API MCP. When you’re ready to run these calls in production, Get started with Interest Rates API.
Additional Reference: Endpoint Shapes and Field Notes
- /latest: Includes rates, dates, currencies maps per symbol. Always inspect dates[symbol] for effective dates on monthly series.
- /historical: date parameter is Y-m-d; for monthly BI_RATE, returns the last day with data in that month.
- /timeseries: start and end are Y-m-d; returns rates[symbol] keyed by daily dates. Use frequencies and currencies to confirm metadata.
- /fluctuation: Returns start_value, end_value, change, change_pct, high, low for each symbol.
- /ohlc: Returns bars with period (YYYY-MM for monthly), open, high, low, close, data_points computed from daily series.
- /convert: Computes total_interest and total_payment for each symbol using the latest rate, then returns a difference block with rate_spread and interest_saved.
FAQ
How often does BI_RATE update?
BI_RATE is monthly. Expect new values after Bank Indonesia policy meetings; the API will reflect the latest effective observation for the month.
What time zone are dates in?
Dates are provided in YYYY-MM-DD without explicit time zone. For monthly symbols like BI_RATE, use the date as the effective month marker and align your reports to month-end or the provided dates map entries.
Are the rates percentages or decimals?
Percentages. A value of 5.75 means 5.75% per annum. Divide by 100 in your calculations where a decimal rate is required.
How should I cache responses?
For BI_RATE, cache /latest for the trading day and /historical for requested dates. Invalidate your cache when a new month begins or when a policy decision is announced. Handle 429 by respecting Retry-After and rate limit headers.
What should I do if I get 404 for a date?
It means no data exists for the requested date/range. Check the details field for available ranges and adjust your query. For monthly BI_RATE, try any date within the month; the API resolves to the last available day in that month.
If you’re building a lending platform, treasury dashboard, or macro analysis pipeline and need BI_RATE in production, generate your key and start making GET requests in minutes: Register. For a deeper tour of capabilities, visit the MCP.