BOC (BOC_OVERNIGHT) Interest Rate

BOC (BOC_OVERNIGHT) Interest Rate

You need to bring the Bank of Canada’s policy stance into your software—cleanly, reliably, and with code you can ship today. In this guide you’ll integrate BOC_OVERNIGHT (the Bank of Canada Overnight Rate) from the Interest Rates API into dashboards, pricing tools, risk models, and loan calculators. By the end, you’ll fetch latest and historical values, compute fluctuations and OHLC, compare loan costs, and understand how to operationalize publication cadence, business days, and caching.

What BOC_OVERNIGHT is and how it’s expressed

BOC_OVERNIGHT represents the Bank of Canada’s target overnight rate—Canada’s key policy rate that anchors short-term Canadian dollar funding costs. It directly informs monetary policy analysis, loan repricing, and discounting assumptions in CAD. As exposed by the API, the rate is returned as a numeric percentage (e.g., 2.25 means 2.25 percent per annum). For monthly symbols like BOC_OVERNIGHT, historical requests for a day within a month resolve to the latest available observation in that month.

Illustration: BOC (BOC_OVERNIGHT) Interest Rate

Publication cadence in the API for BOC_OVERNIGHT is monthly. When using daily time series or OHLC, the API derives daily points from the policy-effective rate where available; for monthly symbols, the frequency value in responses indicates how the API serves series data. Effective dates are conveyed via date fields so you can align changes to policy meeting months or decision windows.

Quick start: fetch the latest BOC_OVERNIGHT value

All endpoints are GET requests under the base URL https://interestratesapi.com/api/v1/ and authenticate via the api_key query parameter. Below is a copy-pasteable cURL and the official sample JSON response.

curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=BOC_OVERNIGHT"
{
    "success": true,
    "date": "2026-09-30",
    "base": "CAD",
    "rates": {
        "BOC_OVERNIGHT": 2.25
    },
    "dates": {
        "BOC_OVERNIGHT": "2026-09-30"
    },
    "currencies": {
        "BOC_OVERNIGHT": "CAD"
    },
    "base_filter_note": null
}

How to read this:

  • rates is a map keyed by symbol. Here BOC_OVERNIGHT is 2.25 (percent).
  • date is the global reference date of the payload. For monthly series, this often matches the month-end or last effective day where data exists.
  • dates maps each symbol to its effective date. For BOC_OVERNIGHT, that’s “2026-09-30”.
  • currencies confirms the policy currency (“CAD”).

Use the effective date to align your accrual periods. For example, when calculating monthly interest accruals in September, use the value with dates.BOC_OVERNIGHT = 2026-09-30 for that month’s observation.

Get an API key at Register for Interest Rates API or review the MCP at Interest Rates API MCP. You can also Get started with Interest Rates API when you’re ready to integrate.

Endpoint-by-endpoint integration for BOC_OVERNIGHT

1) Catalogue: /symbols

Discover available symbols and filter by category or currency. This is useful for validating BOC_OVERNIGHT is present and for building a symbol picker.

cURL

Python (requests)

import requests

params = dict(category='central_bank', base='CAD', api_key='YOUR_API_KEY')
r = requests.get('https://interestratesapi.com/api/v1/symbols', params=params)
symbols = r.json()
print(symbols.get('success'), symbols.get('count'))

JavaScript (fetch)

const res = await fetch('https://interestratesapi.com/api/v1/symbols?category=central_bank&base=CAD&api_key=YOUR_API_KEY');
const data = await res.json();
console.log(data.success, data.count);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/symbols?category=central_bank&base=CAD&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
echo $data['success'] ? $data['count'] : $data['error'];
?

Sample JSON response shape (fields you’ll use):

Field notes:

  • symbols[].symbol is the identifier you pass to other endpoints (e.g., BOC_OVERNIGHT).
  • frequency helps with downstream sampling and caching; BOC_OVERNIGHT is monthly in this API.

2) Latest: /latest

Use /latest to show the current BOC_OVERNIGHT in a dashboard, trigger pricing updates, or reprice loans when policy changes.

cURL (official)

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/latest',
params=dict(symbols='BOC_OVERNIGHT', api_key='YOUR_API_KEY')
)
data = r.json()
rate = data['rates']['BOC_OVERNIGHT']
eff_date = data['dates']['BOC_OVERNIGHT']
ccy = data['currencies']['BOC_OVERNIGHT']
print(rate, eff_date, ccy)

JavaScript (fetch)

const response = await fetch(
'https://interestratesapi.com/api/v1/latest?symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY'
);
const latest = await response.json();
const rate = latest.rates['BOC_OVERNIGHT'];
const effDate = latest.dates['BOC_OVERNIGHT'];
console.log(rate, effDate);

PHP

<?php
$params = http_build_query(['symbols' => 'BOC_OVERNIGHT', 'api_key' => 'YOUR_API_KEY']);
$json = file_get_contents('https://interestratesapi.com/api/v1/latest?'.$params);
$data = json_decode($json, true);
echo $data['rates']['BOC_OVERNIGHT'].' on '.$data['dates']['BOC_OVERNIGHT'];
?

Official JSON (do not modify values):

Use cases: pin the policy rate on your homepage, drive rule-based risk scorecards, or feed downstream amortization calculators. Respect the dates map for effective dating.

3) Historical: /historical

Get the BOC_OVERNIGHT value for a specific date. For monthly symbols, if you request a mid-month date, the API returns the last day with data in that month.

cURL

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/historical',
params=dict(date='2025-06-15', symbols='BOC_OVERNIGHT', api_key='YOUR_API_KEY')
)
hist = r.json()
print(hist['date'], hist['rates']['BOC_OVERNIGHT'])

JavaScript (fetch)

const res = await fetch(
'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY'
);
const data = await res.json();
console.log(data.date, data.rates['BOC_OVERNIGHT']);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
echo $data['rates']['BOC_OVERNIGHT'];
?

Sample JSON:

Field note: For monthly symbols, “date” reflects the requested date; the symbol’s effective observation aligns to that month’s latest available day. Use currencies[symbol] if you build multi-currency UIs.

4) Time series: /timeseries

Retrieve a continuous series for BOC_OVERNIGHT over a date range for charting and backtesting.

cURL

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/timeseries',
params=dict(start='2025-10-28', end='2026-10-28', symbols='BOC_OVERNIGHT', api_key='YOUR_API_KEY')
)
ts = r.json()
series = ts['rates']['BOC_OVERNIGHT']
for d, v in series.items():
pass # process (d, v) per your charting tool

JavaScript (fetch)

const res = await fetch(
'https://interestratesapi.com/api/v1/timeseries?start=2025-10-28&end=2026-10-28&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY'
);
const ts = await res.json();
const points = Object.entries(ts.rates['BOC_OVERNIGHT']);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-28&end=2026-10-28&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
foreach ($data['rates']['BOC_OVERNIGHT'] as $date => $value) {
// render into chart
}
?

Sample JSON:

Field notes:

  • rates[symbol] is a date-indexed map for charting and statistical analysis.
  • frequencies helps you detect if the stream is daily or monthly-sampled. For BOC_OVERNIGHT, the API can serve daily-resolved observations reflecting the policy rate over days.

5) Fluctuation: /fluctuation

Compute change statistics, including rate_spread logic you might otherwise hand-roll. Ideal for risk dashboards and regulatory reporting snapshots.

cURL

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/fluctuation',
params=dict(start='2025-10-28', end='2026-10-28', symbols='BOC_OVERNIGHT', api_key='YOUR_API_KEY')
)
fl = r.json()['rates']['BOC_OVERNIGHT']
print(fl['change'], fl['change_pct'], fl['high'], fl['low'])

JavaScript (fetch)

const res = await fetch(
'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-28&end=2026-10-28&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY'
);
const fx = await res.json();
const f = fx.rates['BOC_OVERNIGHT'];
console.log(f.change, f.change_pct, f.high, f.low);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-28&end=2026-10-28&symbols=BOC_OVERNIGHT&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
$f = $data['rates']['BOC_OVERNIGHT'];
echo "{$f['change']} ({$f['change_pct']}%), H: {$f['high']} L: {$f['low']}";
?

Sample JSON:

Field notes:

  • change and change_pct are already computed. change_pct is null when start_value = 0.
  • Use high and low for chart context or alert thresholds.

6) OHLC: /ohlc

Derive candlestick-style summaries by month, quarter, or week to reduce chart noise or feed time-aggregated analytics. OHLC is computed on the fly from daily data.

cURL

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/ohlc',
params=dict(symbols='BOC_OVERNIGHT', period='monthly', start='2025-10-28', end='2026-10-28', api_key='YOUR_API_KEY')
)
ohlc = r.json()['rates']['BOC_OVERNIGHT']
for bar in ohlc:
# bar = {period, open, high, low, close, data_points}
pass

JavaScript (fetch)

const res = await fetch(
'https://interestratesapi.com/api/v1/ohlc?symbols=BOC_OVERNIGHT&period=monthly&start=2025-10-28&end=2026-10-28&api_key=YOUR_API_KEY'
);
const o = await res.json();
console.log(o.rates['BOC_OVERNIGHT']);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/ohlc?symbols=BOC_OVERNIGHT&period=monthly&start=2025-10-28&end=2026-10-28&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
foreach ($data['rates']['BOC_OVERNIGHT'] as $bar) {
// render $bar['period'], $bar['open'], $bar['close']
}
?

Sample JSON:

Field notes:

  • period is the aggregation bucket (e.g., “2025-01”).
  • data_points counts the number of daily points contributing to that bar.

7) Loan interest comparison: /convert

Compare the total interest cost of a simple loan priced at the latest BOC_OVERNIGHT versus another symbol. This is practical for mortgage and treasury teams evaluating benchmarks or spreads.

cURL

Python (requests)

import requests

r = requests.get(
'https://interestratesapi.com/api/v1/convert',
params=dict(from='BOC_OVERNIGHT', to='ECB_MRO', amount=100000, term_months=12, api_key='YOUR_API_KEY')
)
cmp = r.json()
spread = cmp['difference']['rate_spread']
interest_saved = cmp['difference']['interest_saved']
print(spread, interest_saved)

JavaScript (fetch)

const res = await fetch(
'https://interestratesapi.com/api/v1/convert?from=BOC_OVERNIGHT&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY'
);
const comp = await res.json();
console.log(comp.difference.rate_spread, comp.difference.interest_saved);

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/convert?from=BOC_OVERNIGHT&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
echo $data['difference']['rate_spread'];
?

Sample JSON:

Field notes:

  • rate_spread is simply from.rate − to.rate in percentage points.
  • total_interest and total_payment reflect a simple, non-amortizing comparison over term_months at the latest rates.

How to compute spreads and monthly payments from returned values

Spreads: use simple subtraction in percentage points. If you have BOC_OVERNIGHT = r1 and a comparator rate r2, spread_pp = r1 − r2. Feed that into hedging logic or pricing rules.

Monthly interest (simple): given a principal P and an annualized percentage rate r (e.g., r = data.rates[“BOC_OVERNIGHT”]), monthly interest for a non-amortizing month is P × (r / 100) × (1/12). For a multi-month period m, total simple interest ≈ P × (r / 100) × (m/12). If you need amortized payments, apply your amortization formula using the monthly rate r_m = (r / 100) / 12 and your schedule of principal reductions. Do not assume compounding conventions beyond your product specs; the API returns a headline annual percentage.

Operational details: publication frequency, business days, and caching

  • Frequency: BOC_OVERNIGHT is monthly in this API. The latest endpoint provides the current month’s observation once available. Time series can present daily points when derived from the policy-effective rate.
  • Business days: Central bank policy changes are not tied to daily market holidays, but your downstream analytics should consider that monthly effective values may update intra-month or align to specific effective days. Use the dates map for the authoritative effective date per symbol.
  • Caching: Cache positive responses keyed by symbol and effective date. For dashboards, a cache TTL of several minutes to an hour is generally safe for central bank rates; invalidate on known decision days or when dates[symbol] changes. Respect 429 rate limits; the API emits X-RateLimit-* headers and Retry-After on throttling.
  • Validation and errors: Handle 401 (api_key missing/invalid), 403 (no active plan), 404 (no symbols matched or no data in range), and 422 (validation errors such as date format). Surface details to logs and guide users to adjust ranges.

Real-world integrations for BOC_OVERNIGHT

  • Pricing dashboards: Pin BOC_OVERNIGHT with the latest endpoint and align visuals with the effective date so stakeholders see the current policy stance.
  • Risk and ALM: Use fluctuation to monitor changes and thresholds; feed OHLC into risk indicators to detect tightening/easing cycles.
  • Loan and mortgage tools: Drive benchmark-linked pricing off BOC_OVERNIGHT and expose transparent spreads. Use /convert to compare against alternative policy benchmarks.
  • Macro research and quant: Pull time series into factor models, event studies around policy dates, and sensitivity analysis.

Documentation and model context are available at interestratesapi.com, with the Interest Rates API MCP for model and computation pointers.

Error handling and reliability patterns

Implement robust GET requests with query parameters only; do not send auth in headers. On 404 with details, inspect the available date range before retrying. For monthly symbols, if a mid-month date returns no data yet, either shift to the last known effective month or present a “pending” state. Always log the dates and currencies maps to ensure you’re interpreting the correct observation and currency.

To avoid surprises in downstream systems, normalize data types as numeric floats for rates and ISO date strings for dates. When aggregating across symbols with different frequencies, resample explicitly in your code.

Additional examples with multi-symbol context

If you need to show BOC_OVERNIGHT alongside another central bank rate in a comparison module, you can pass multiple symbols to /latest, /timeseries, and /fluctuation. Keep in mind base and currencies maps will help you present currency-correct labels and prevent mixing CAD logic with EUR or USD assumptions. For loan comparisons, /convert already performs spread and cost calculations from the latest values.

Common errors and rate limits

  • 401 unauthorized: Ensure every URL includes ?api_key=YOUR_API_KEY (query param), not a header.
  • 422 validation: Dates must be Y-m-d; symbols must be valid identifiers (e.g., BOC_OVERNIGHT).
  • 429 throttling: Honor Retry-After; monitor X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset to shape your request budget.

If a date or range lacks data (404), review the details field (when provided) for an available window and adjust your query accordingly.

Where to go next

Productionize with the docs at interestratesapi.com and the MCP reference: MCP. When you’re ready to deploy, grab an API key at Register.

FAQ

Q: What unit is BOC_OVERNIGHT returned in?
A: It’s a percentage rate (e.g., 2.25 means 2.25 percent annualized). Convert to a monthly simple rate by dividing by 12, or apply your amortization formula using r/100/12.

Q: How do I handle effective dates for monthly symbols?
A: Use the dates map (e.g., dates[“BOC_OVERNIGHT”]) from /latest or the date field behavior in /historical. For monthly series, a request within a month resolves to the last available day of that month with data.

Q: Can I compare BOC_OVERNIGHT with another policy rate for a loan scenario?
A: Yes. Use /convert with from=BOC_OVERNIGHT and to=ANOTHER_SYMBOL to get total interest, total payment, and rate_spread for the latest observations.

Q: Do I need to send authentication in headers?
A: No. All endpoints use GET with the api_key query parameter appended to the URL (e.g., ?api_key=YOUR_API_KEY).

Q: How should I cache BOC_OVERNIGHT?
A: Cache on symbol and effective date. For central bank rates, refreshing every few minutes to hourly is typical, with explicit invalidation on decision days or whenever dates[“BOC_OVERNIGHT”] updates.

Ship your integration using the docs at interestratesapi.com. When you’re ready, Register to get your API key and start building with the Bank of Canada Overnight Rate today.

Ready to get started?

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

Get API Key

Related posts