BCRP Live Rate API: Latest Print and Daily Change

BCRP Live Rate API: Latest Print and Daily Change

You need a reliable way to pull the Banco Central de Reserva del Perú (BCRP) policy rate into your systems and compute daily changes, loan spreads, and payments with minimal latency. By the end of this article, you will query BCRP_RATE live values, contrast them with prior periods, compute spreads and monthly payments against your internal benchmarks, and render a lightweight React widget that refreshes the latest print automatically.

What the latest BCRP_RATE tells your app right now

BCRP_RATE is the BCRP reference (policy) rate that anchors short-term funding costs in Peru (PEN). While the underlying policy rate is set on decision days (monthly cadence), your application still needs a daily-available source of truth. The Interest Rates API delivers this as a consistently keyed symbol—BCRP_RATE—so you can treat it like any other benchmark in your system.

Illustration: BCRP Live Rate API: Latest Print and Daily Change

Key points for developers:

  • Symbol: BCRP_RATE
  • Category: central_bank
  • Currency: PEN context, but the API’s “base” field and per-symbol “currencies” reflect how values are standardized for aggregation. Always read the “currencies” map in the response.
  • Frequency: monthly policy decisions; daily availability in the API for stable downstream integration (see time series notes below).

For production, cache the latest response until the API’s reported “date” changes, and handle non-business days by reusing the most recent value.

Try Interest Rates API and Explore Interest Rates API features to see how these endpoints unify central bank and interbank benchmarks behind a single, stable interface.

Fetch the live BCRP_RATE with /latest (primary endpoint)

The /latest endpoint returns the most recent available value and its effective date, which your code should treat as the canonical “as-of” for calculations. Authentication is always via the api_key query parameter; all methods are GET.

cURL: BCRP_RATE latest

curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=SOFR"

Python (requests): BCRP_RATE latest

import requests

resp = requests.get(
"https://interestratesapi.com/api/v1/latest",
params={"symbols": "BCRP_RATE", "api_key": "YOUR_API_KEY"},
timeout=10
)
data = resp.json()

# Extract fields
latest_date = data.get("date")
bcrp_value = data.get("rates", {}).get("BCRP_RATE")
bcrp_effective_date = data.get("dates", {}).get("BCRP_RATE")
bcrp_currency = data.get("currencies", {}).get("BCRP_RATE")

print("As-of:", latest_date)
print("BCRP_RATE:", bcrp_value, bcrp_currency)
print("Effective date:", bcrp_effective_date)

JavaScript (fetch): BCRP_RATE latest

const res = await fetch(
"https://interestratesapi.com/api/v1/latest?symbols=BCRP_RATE&api_key=YOUR_API_KEY"
);
const data = await res.json();

const asOf = data.date;
const value = data.rates?.BCRP_RATE;
const effDate = data.dates?.BCRP_RATE;
const curr = data.currencies?.BCRP_RATE;

console.log({ asOf, value, effDate, curr });

PHP (cURL): BCRP_RATE latest

<?php
$url = "https://interestratesapi.com/api/v1/latest?symbols=BCRP_RATE&api_key=YOUR_API_KEY";
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10
]);
$body = curl_exec($ch);
if ($body === false) {
throw new \RuntimeException("cURL error: " . curl_error($ch));
}
curl_close($ch);

$data = json_decode($body, true);
$bcrpValue = $data["rates"]["BCRP_RATE"] ?? null;
$asOf = $data["date"] ?? null;
$effDate = $data["dates"]["BCRP_RATE"] ?? null;
$curr = $data["currencies"]["BCRP_RATE"] ?? null;

echo "As-of: $asOf, BCRP_RATE: $bcrpValue $curr, Effective: $effDate\n";

Sample JSON (shape and fields)

The example below (from the API reference) shows a /latest response that includes BCRP_RATE alongside another symbol. Your production code will typically request BCRP_RATE alone, as shown in the code samples above.

{
"success": true,
"date": "2026-10-01",
"base": "USD",
"rates": {
"SOFR": 3.87
},
"dates": {
"SOFR": "2026-10-01"
},
"currencies": {
"SOFR": "USD"
},
"base_filter_note": null
}

How to read this:

  • success: Request status.
  • date: Server’s as-of date for this batch response. Use this for caching and display.
  • rates: Latest value per symbol (percent, unscaled). For example, 5.33 means 5.33%.
  • dates: Effective date per symbol (when that rate was last updated).
  • currencies: Currency context per symbol; treat these as metadata for your UI and analytics grouping.

Note: Do not assume the “base” is always a specific currency when requesting mixed symbols; consult “currencies” for each symbol you ingest.

Official sample (verbatim) for response shape

The following official example shows a /latest call for SOFR. While this post focuses on BCRP_RATE, this sample is included verbatim to illustrate the endpoint shape and fields:

Effective dates, frequency, and business-day behavior

BCRP_RATE is a central bank policy rate with a monthly decision cadence. The API surfaces the most recent available value on each business day so your downstream processes do not fail on non-trading days or between meetings.

  • Interpretation: Treat “dates.BCRP_RATE” as the effective date of the last policy decision or update.
  • Caching: Cache responses keyed by the top-level “date” and symbol-level effective dates. If neither changes, you can avoid reprocessing.
  • Non-business days: Expect the same last effective value to carry through weekends and holidays. Use /historical or /timeseries if you need to align to specific calendar dates.

Compare today with 1 month and 1 year ago using /historical

To show context in your UI or to drive automated loan repricing, query the value on specific calendar dates. For monthly symbols, “the last day with data within that month is used,” which simplifies alignment to mid-month dates.

cURL: historical BCRP_RATE

Python: historical BCRP_RATE for month-over-month and year-over-year

import datetime as dt
import requests

api = "https://interestratesapi.com/api/v1/historical"
today = dt.date.today()

def fetch(date_str):
r = requests.get(api, params={"date": date_str, "symbols": "BCRP_RATE", "api_key": "YOUR_API_KEY"}, timeout=10)
r.raise_for_status()
return r.json()

# 1-month-ago (same day-of-month)
one_month_ago = (today.replace(day=15) if today.day < 28 else today).replace(month=((today.month - 2) % 12) + 1,
year=today.year - (1 if today.month == 1 else 0)) # safe-ish example
one_year_ago = today.replace(year=today.year - 1)

resp_m = fetch(one_month_ago.isoformat())
resp_y = fetch(one_year_ago.isoformat())

m_value = resp_m.get("rates", {}).get("BCRP_RATE")
y_value = resp_y.get("rates", {}).get("BCRP_RATE")

print("MoM (approx, monthly symbol rules apply):", m_value)
print("YoY:", y_value)

JavaScript: historical BCRP_RATE

async function getHistorical(dateISO) {
const url = `https://interestratesapi.com/api/v1/historical?date=${dateISO}&symbols=BCRP_RATE&api_key=YOUR_API_KEY`;
const r = await fetch(url);
return r.json();
}

const oneMonthAgoISO = "2025-06-15"; // example
getHistorical(oneMonthAgoISO).then(console.log);

PHP: historical BCRP_RATE

<?php
$date = "2025-06-15";
$url = "https://interestratesapi.com/api/v1/historical?date={$date}&symbols=BCRP_RATE&api_key=YOUR_API_KEY";
echo file_get_contents($url);

Sample JSON (from reference)

Use the returned “date” to confirm which calendar day has been applied. For monthly symbols, the API selects the last available day within that month if the exact date lacks a new fixing.

Quantify the 30‑day daily change with /fluctuation

For dashboards and risk monitors, the /fluctuation endpoint summarizes the range and net change between two dates, so you don’t need to compute these statistics client‑side.

cURL: 30-day fluctuation for BCRP_RATE

Python: 30-day fluctuation

import requests
params = {
"start": "2025-10-03",
"end": "2026-10-03",
"symbols": "BCRP_RATE",
"api_key": "YOUR_API_KEY"
}
fx = requests.get("https://interestratesapi.com/api/v1/fluctuation", params=params, timeout=10).json()
stats = fx.get("rates", {}).get("BCRP_RATE", {})
print({
"start_date": stats.get("start_date"),
"end_date": stats.get("end_date"),
"start_value": stats.get("start_value"),
"end_value": stats.get("end_value"),
"change": stats.get("change"),
"change_pct": stats.get("change_pct"),
"high": stats.get("high"),
"low": stats.get("low"),
})

JavaScript: 30-day fluctuation

const url = "https://interestratesapi.com/api/v1/fluctuation?start=2025-10-03&end=2026-10-03&symbols=BCRP_RATE&api_key=YOUR_API_KEY";
const resp = await fetch(url);
const fx = await resp.json();
const stats = fx.rates?.BCRP_RATE ?? {};
console.log(stats);

PHP: 30-day fluctuation

<?php
$u = "https://interestratesapi.com/api/v1/fluctuation?start=2025-10-03&end=2026-10-03&symbols=BCRP_RATE&api_key=YOUR_API_KEY";
echo file_get_contents($u);

Sample JSON (from reference)

Fields:

  • start_value and end_value: values at the start and end boundaries.
  • change and change_pct: net movement in absolute and percent terms.
  • high and low: intra-range extremes, useful for volatility and guardrails.

Time alignment and OHLC views for analytics pipelines

Some teams prefer to backfill a full panel or render candlesticks to visualize regime changes. The following endpoints help.

/timeseries: build a panel between two dates

Sample JSON (from reference):

Interpretation: Even for monthly policy rates, the API can present values on business days to simplify joins, rolling-window analytics, and plot generation.

/ohlc: monthly or weekly candlesticks computed from daily data

Sample JSON (from reference):

OHLC is computed on-the-fly from the underlying daily series. Use this for concise visualizations and to compress data volumes sent to front ends.

Compute spreads and monthly payments from BCRP_RATE

Because the API returns unscaled percentage values (e.g., 5.33 means 5.33%), you’ll typically convert to a rate fraction by dividing by 100 before compounding or amortization steps. Here are common operations.

Spread computation

Spread to an internal benchmark R (in percent) is simply: spread_pct = BCRP_RATE − R. If you store decimals, convert each percent to decimal first: spread_decimal = (BCRP_RATE/100) − (R/100).

Monthly payment (amortizing loan) based on BCRP_RATE

For a principal amount P, annual nominal rate r_annual = BCRP_RATE/100, term N months, the standard amortizing payment is:

  • r_monthly = r_annual / 12
  • payment = P × r_monthly / (1 − (1 + r_monthly)^(−N))

Use the “dates.BCRP_RATE” field as the effective date stamp for your pricing snapshot and archive a copy for auditability.

Programmatic comparison with another symbol via /convert

/convert simplifies a side-by-side comparison of total interest for a simple (non-amortizing) loan at the latest rate of each symbol. Example (from the reference):

Use this when you need a quick comparison on a single principal and term. For amortizing loans, apply the formula above in your code after fetching the live rate.

Why developers and traders track BCRP_RATE daily

BCRP’s policy path shapes the local yield curve, lending standards, and currency expectations. Even though the underlying decisions are monthly, downstream markets respond continuously. Typical use cases:

  • Treasury: Update cash investment hurdles and internal transfer pricing curves.
  • Lending: Recalculate repricing candidates or promotional rates driven by policy moves.
  • Risk/ALM: Stress testing scenarios when the last print suggests a change in the easing/tightening cycle.
  • FX and rates trading: Cross-market relative value versus other LATAM policy rates and DM curves.

Having a daily-available, consistently keyed BCRP_RATE simplifies your ETL and front-end display logic, removing exceptions on weekends and holidays.

React widget: lightweight live BCRP_RATE tile

This snippet fetches /latest on a configurable interval and renders the current value with its effective date. You can extend it to include /fluctuation for a 30‑day delta badge.

import React, { useEffect, useState } from "react";

export default function BcrpRateTile() {
const [value, setValue] = useState(null);
const [asOf, setAsOf] = useState(null);
const [effDate, setEffDate] = useState(null);
const [err, setErr] = useState(null);

useEffect(() => {
let alive = true;

async function load() {
try {
const r = await fetch(
"https://interestratesapi.com/api/v1/latest?symbols=BCRP_RATE&api_key=YOUR_API_KEY",
{ cache: "no-store" }
);
if (!r.ok) throw new Error(`HTTP ${r.status}`);
const data = await r.json();
if (!alive) return;
setValue(data.rates?.BCRP_RATE ?? null);
setAsOf(data.date ?? null);
setEffDate(data.dates?.BCRP_RATE ?? null);
setErr(null);
} catch (e) {
if (alive) setErr(e.message || "Fetch error");
}
}

load();
const id = setInterval(load, 60_000); // refresh every 60s
return () => { alive = false; clearInterval(id); };
}, []);

if (err) return <div role="alert">BCRP_RATE error: {err}</div>;
if (value == null) return <div>Loading BCRP_RATE…</div>;

return (
<div aria-live="polite">
<div><strong>BCRP_RATE</strong>: {value}%</div>
<div>As-of: {asOf} (effective: {effDate})</div>
</div>
);
}

Production notes:

  • Use cache: "no-store" or append a timestamp if your CDN is aggressive.
  • Backoff and retry on 429 responses by inspecting Retry-After and X-RateLimit-* headers.
  • For user-facing tiles, round to two decimals and show the effective date clearly.

Error handling, rate limits, and caching strategy

Common error responses (JSON shape: success=false, error=message):

  • 401: Missing or invalid api_key.
  • 403: Account not authorized.
  • 404: No symbols matched or no data available for the date/range (may include details).
  • 422: Validation error (e.g., bad date format).
  • 429: Request quota exhausted (check Retry-After, X-RateLimit-* headers).

Recommended approach:

  • Cache /latest until either the top-level “date” or the “dates.BCRP_RATE” changes.
  • For /historical and /timeseries, cache by (symbol, start, end) plus any base filter.
  • Normalize and store the “currencies” map alongside values so downstream analytics can render currency-aware summaries.

See MCP for protocol-level notes and deeper endpoint references.

Production checklist for BCRP_RATE

  • Use only GET requests to https://interestratesapi.com/api/v1/ with api_key as a query parameter.
  • Request BCRP_RATE via /latest for your primary display and intraday caching.
  • Use /historical to align to month-ago and year-ago snapshots; remember monthly symbol rules.
  • Add /fluctuation for 30‑day change, high, and low.
  • When needed, pull /timeseries for full backfills and /ohlc for compact visualization feeds.
  • Compute amortizing payments by converting percent to a decimal and using a standard annuity formula.
  • Guard against 429 by backing off and retrying after the server’s indicated reset.

Get started with Interest Rates API to unify central bank, interbank, and treasury benchmarks under one consistent JSON interface.

FAQ

Q1: What unit is BCRP_RATE returned in?
A: As a percent, unscaled (e.g., 5.33 means 5.33%). Convert to decimal (divide by 100) before compounding or amortization.

Q2: Which date should I display—top-level “date” or “dates.BCRP_RATE”?
A: For user display, show the symbol’s effective date from dates.BCRP_RATE. Use the top-level “date” for caching and batch versioning.

Q3: How does /historical work for monthly symbols like BCRP_RATE?
A: The API uses the last day with data within the requested month when the exact date has no new fixing. This keeps month-over-month comparisons consistent.

Q4: Can I compare BCRP_RATE to another rate directly?
A: Yes. Use /latest to fetch both and compute spreads, or call /convert for a direct interest-cost comparison on a given principal and term.

Q5: What happens on weekends and holidays?
A: The API returns the most recent effective value. Your application should treat it as current until the effective date changes on the next business update.

Ship your integration now: call /latest for BCRP_RATE, add a 30‑day /fluctuation badge, and expose MoM/YoY /historical comparisons in your UI. Then register your key and move to production confidently with standardized endpoints across central bank and interbank benchmarks. Register — or head to Try Interest Rates API and Explore Interest Rates API features to see more endpoints and symbols.

Ready to get started?

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

Get API Key

Related posts