Your team needs an accurate, developer-friendly way to fetch the Riksbank policy rate and wire it directly into pricing, risk, and analytics workflows. By the end of this guide you will integrate the Riksbank Repo Rate (symbol: RIKSBANK_REPO) from interestratesapi.com, understand how to read effective dates and units, query latest and historical values, compute spreads and loan costs, and build time series–driven features around Swedish monetary policy.
What the RIKSBANK_REPO rate represents
RIKSBANK_REPO is the Riksbank Repo Rate, Sweden’s key policy rate that anchors SEK money-market conditions and passes through to mortgages, corporate loans, and savings rates. In the Interest Rates API it is a central bank benchmark with a monthly frequency. The value is expressed as a percentage rate (e.g., 1.75 means 1.75% annualized).
For monthly symbols, the API associates values with a specific effective date within each month. When you query a specific date, the API uses the last day with data in that month if the exact date has no entry. This ensures you always receive the operative policy rate for that calendar period.
API basics: base URL, HTTP method, and authentication
- Base URL: https://interestratesapi.com/api/v1/
- HTTP method: GET for all endpoints
- Authentication: pass your API key via the api_key query parameter (no headers)
Every request in this article is read-only and URL-parameterized. For production, use HTTPS and never embed keys in client-side code shipped to browsers without a proxy. See the MCP docs and the main site at interestratesapi.com for broader coverage.
Symbols catalogue: discover the RIKSBANK_REPO identifier
Use the symbols endpoint to enumerate what’s available. You can filter by category or base currency. The sample below shows the official response shape; in your app, filter for central_bank and currency SEK to find RIKSBANK_REPO.
cURL
curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=RIKSBANK_REPO"
JSON response
{
"success": true,
"date": "2026-09-30",
"base": "SEK",
"rates": {
"RIKSBANK_REPO": 1.75
},
"dates": {
"RIKSBANK_REPO": "2026-09-30"
},
"currencies": {
"RIKSBANK_REPO": "SEK"
},
"base_filter_note": null
}
Key fields:
- symbol: the identifier to use with other endpoints (e.g., RIKSBANK_REPO)
- frequency: reporting cadence (RIKSBANK_REPO is monthly)
- currency_code: currency the rate is associated with (SEK for RIKSBANK_REPO)
Tip: Cache the symbols catalogue and refresh periodically, as it changes infrequently relative to time series values.
Latest value: get the current RIKSBANK_REPO reading
Fetch the latest policy rate and its effective date. This is the entry point for dashboards, pricing engines, and trigger-based alerts.
cURL (official sample)
JSON response (official sample)
How to read this:
- rates: a map symbol → numeric rate as a percent (1.75 means 1.75% annualized)
- dates: map symbol → effective date for that latest value
- base/currencies: for RIKSBANK_REPO the currency is SEK
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/latest',
params={'symbols': 'RIKSBANK_REPO', 'api_key': 'YOUR_API_KEY'}
)
data = resp.json()
rate = data['rates']['RIKSBANK_REPO'] # e.g., 1.75
effective_date = data['dates']['RIKSBANK_REPO'] # e.g., "2026-09-30"
currency = data['currencies']['RIKSBANK_REPO'] # "SEK"
print(rate, effective_date, currency)
JavaScript (fetch)
const response = await fetch(
'https://interestratesapi.com/api/v1/latest?symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY'
);
const data = await response.json();
const rate = data.rates.RIKSBANK_REPO;
const effectiveDate = data.dates.RIKSBANK_REPO;
const currency = data.currencies.RIKSBANK_REPO;
console.log(rate, effectiveDate, currency);
PHP
<?php
$url = 'https://interestratesapi.com/api/v1/latest?symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
$json = file_get_contents($url);
$data = json_decode($json, true);
$rate = $data['rates']['RIKSBANK_REPO'];
$effectiveDate = $data['dates']['RIKSBANK_REPO'];
$currency = $data['currencies']['RIKSBANK_REPO'];
echo $rate . " " . $effectiveDate . " " . $currency;
Historical value on a specific date
Retrieve the repo rate operative for a given calendar date. For monthly symbols, the API uses the last day with data within that month if the given date lacks an entry.
cURL
JSON response
Fields:
- date: the requested calendar date
- rates: value in percent for that date’s applicable period
- currencies: currency map for each symbol
Note: Numeric values in examples are illustrative in documentation responses. Always trust what your live call returns for production logic.
Python
import requests
params = {'date': '2025-06-15', 'symbols': 'RIKSBANK_REPO', 'api_key': 'YOUR_API_KEY'}
r = requests.get('https://interestratesapi.com/api/v1/historical', params=params)
data = r.json()
value = data['rates']['RIKSBANK_REPO']
print(value)
JavaScript
const url = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
const res = await fetch(url);
const data = await res.json();
console.log(data.rates.RIKSBANK_REPO);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
$d = json_decode(file_get_contents($u), true);
echo $d['rates']['RIKSBANK_REPO'];
Time series between two dates
Build charts, regressions, or policy trend monitors by requesting a contiguous series. Timeseries returns a symbol-keyed map of date → value pairs across your range.
cURL
JSON response
Fields you’ll use:
- rates → RIKSBANK_REPO: map of ISO date strings to numeric percent values
- frequencies: reported cadence for each symbol
- start_date/end_date: normalized bounds actually returned
Python
import requests
params = {
'start': '2025-10-14',
'end': '2026-10-14',
'symbols': 'RIKSBANK_REPO',
'api_key': 'YOUR_API_KEY'
}
res = requests.get('https://interestratesapi.com/api/v1/timeseries', params=params)
js = res.json()
series = js['rates']['RIKSBANK_REPO'] # dict of date->value
dates = sorted(series.keys())
values = [series[d] for d in dates]
print(dates[:3], values[:3])
JavaScript
const tsUrl = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-14&end=2026-10-14&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
const tsRes = await fetch(tsUrl);
const ts = await tsRes.json();
const entries = Object.entries(ts.rates.RIKSBANK_REPO);
console.log(entries.slice(0, 3));
PHP
<?php
$url = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-14&end=2026-10-14&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
$series = $data['rates']['RIKSBANK_REPO'];
foreach ($series as $d => $v) {
echo $d . ": " . $v . PHP_EOL;
}
Fluctuation: changes, highs, and lows over a window
Summarize rate dynamics for a range, including absolute and percentage changes, and intra-window highs/lows. This is useful for risk summaries, scenario dashboards, or performance notes.
cURL
JSON response
Key fields:
- change: end_value − start_value, in percentage points
- change_pct: percent change relative to start_value (null if start is 0)
- high/low: extrema within the given date range
Python
import requests
p = {'start': '2025-10-14', 'end': '2026-10-14', 'symbols': 'RIKSBANK_REPO', 'api_key': 'YOUR_API_KEY'}
fl = requests.get('https://interestratesapi.com/api/v1/fluctuation', params=p).json()
stats = fl['rates']['RIKSBANK_REPO']
print(stats['change'], stats['change_pct'], stats['high'], stats['low'])
JavaScript
const flUrl = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-14&end=2026-10-14&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
const flRes = await fetch(flUrl);
const flData = await flRes.json();
const st = flData.rates.RIKSBANK_REPO;
console.log(st.change, st.change_pct, st.high, st.low);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-14&end=2026-10-14&symbols=RIKSBANK_REPO&api_key=YOUR_API_KEY';
$j = json_decode(file_get_contents($u), true);
$s = $j['rates']['RIKSBANK_REPO'];
echo $s['change'] . " " . $s['change_pct'];
OHLC: candlestick-style aggregations
For charting and quick scanning of policy regimes, request OHLC aggregations built from daily records. The API can aggregate weekly, monthly, or quarterly; monthly is the default.
cURL
JSON response
Fields:
- open/high/low/close: policy rate values within each period
- data_points: number of source data rows included in that period’s aggregation
Python
import requests
params = {
'symbols': 'RIKSBANK_REPO',
'period': 'monthly',
'start': '2025-10-14',
'end': '2026-10-14',
'api_key': 'YOUR_API_KEY'
}
ohlc = requests.get('https://interestratesapi.com/api/v1/ohlc', params=params).json()
rows = ohlc['rates']['RIKSBANK_REPO']
for row in rows:
print(row['period'], row['open'], row['close'])
JavaScript
const ohlcUrl = 'https://interestratesapi.com/api/v1/ohlc?symbols=RIKSBANK_REPO&period=monthly&start=2025-10-14&end=2026-10-14&api_key=YOUR_API_KEY';
const ohlcRes = await fetch(ohlcUrl);
const ohlc = await ohlcRes.json();
console.log(ohlc.rates.RIKSBANK_REPO);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/ohlc?symbols=RIKSBANK_REPO&period=monthly&start=2025-10-14&end=2026-10-14&api_key=YOUR_API_KEY';
$d = json_decode(file_get_contents($u), true);
foreach ($d['rates']['RIKSBANK_REPO'] as $bar) {
echo $bar['period'] . " O:" . $bar['open'] . " C:" . $bar['close'] . PHP_EOL;
}
Convert: compare loan interest costs across benchmarks
Estimate and compare simple loan interest costs between two benchmarks at their latest values. This is useful to quantify spreads between RIKSBANK_REPO and another policy rate in currency-agnostic terms.
cURL
JSON response
Fields:
- from/to.rate: latest percent rates for each symbol
- total_interest and total_payment: simple-loan calculations for the amount and term
- difference.rate_spread: end-to-end spread between the two latest rates
Python
import requests
params = {
'from': 'RIKSBANK_REPO',
'to': 'ECB_MRO',
'amount': 100000,
'term_months': 12,
'api_key': 'YOUR_API_KEY'
}
cmp = requests.get('https://interestratesapi.com/api/v1/convert', params=params).json()
spread = cmp['difference']['rate_spread']
print(spread)
JavaScript
const convUrl = 'https://interestratesapi.com/api/v1/convert?from=RIKSBANK_REPO&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY';
const convRes = await fetch(convUrl);
const conv = await convRes.json();
console.log(conv.difference.rate_spread);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/convert?from=RIKSBANK_REPO&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY';
$j = json_decode(file_get_contents($u), true);
echo $j['difference']['rate_spread'];
How the rate is expressed, effective dates, and business-day behavior
RIKSBANK_REPO values are percentages (not decimals). When computing interest, first divide by 100 to convert to a fraction. Effective dates appear in the dates map for latest requests and as timeseries keys elsewhere. For monthly symbols, the effective date aligns with the last day with data in the month when querying a specific calendar date, ensuring a stable monthly observation.
Riksbank policy events do not occur daily; the API frequency is monthly for this symbol. For visualization or alignment to business days, expect repeated values across dates in a given month where applicable. When designing caches or aggregations, treat the effective date as the primary boundary for updates.
Practical compute patterns: spreads and payments
- Rate spread: For two percent rates rA and rB, spread = rA − rB (in percentage points). You can compute this from the latest endpoint or retrieve difference.rate_spread via the convert endpoint.
- Monthly loan payment (amortizing): Given principal A, annual percent rate p, and term n months, compute r = (p / 100) / 12 and Payment = A × r ÷ (1 − (1 + r)^(−n)). For interest-only estimates, Interest per month ≈ A × r. Always use the numeric percent from rates and convert to monthly fraction before applying formulas.
For lightweight comparisons without implementing formulas, the convert endpoint returns total_interest and total_payment for simple loans at the latest rates.
Caching, retries, and limits
- Caching: For RIKSBANK_REPO (monthly), a daily cache is typically sufficient. In production, you may cache until a new effective date appears in the dates map or your monitoring detects an update.
- Idempotent GETs: All endpoints are GET-only; use standard retry logic for transient network failures. Avoid retry storms near rate-limit thresholds.
- Rate limits: On HTTP 429 responses, observe Retry-After and the X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers to pace requests.
- Validation: 422 indicates wrong date format or invalid symbol. Verify symbols against the symbols catalogue and use Y-m-d for dates.
Error handling: shapes and common statuses
Errors follow a consistent JSON envelope: success=false and an error message string (some 404s may include details).
- 401: Missing/invalid api_key
- 403: Account lacks an active plan
- 404: No symbols matched or no data for the requested date/range (may include details with available ranges)
- 422: Validation error (e.g., invalid symbol or date)
- 429: Request quota exhausted (includes Retry-After and X-RateLimit-* headers)
Always check the success boolean before reading payload fields. For range queries, confirm start_date/end_date in responses and handle empty rate maps gracefully.
Use cases for fintech and analytics
- Interest-rate dashboards: Plot RIKSBANK_REPO with time series and OHLC for trend recognition and policy regimes.
- Lending and mortgages: Price SEK-linked products using the latest repo rate, compute monthly payments, and quantify spreads against alternative benchmarks.
- Treasury and ALM: Monitor fluctuation statistics for sensitivity analysis and rolling risk reports.
- Macro research: Backtest models using historical and aggregated policy readings; align to effective dates for event-based studies.
All examples in this article come directly from interestratesapi.com. To integrate RIKSBANK_REPO quickly in your stack, review the MCP documentation and register for an API key.
Development checklists for RIKSBANK_REPO integrations
- Use the symbols endpoint at startup or periodically to confirm availability.
- When fetching latest, read both rates[RIKSBANK_REPO] and dates[RIKSBANK_REPO].
- For historical queries, pass Y-m-d; plan for monthly symbols to align to the last data day in the month.
- For charts, prefer timeseries; for summaries, use fluctuation; for candlesticks, use ohlc.
- To compare loan costs or spreads programmatically, use convert or compute from latest values.
- Implement error handling for 401/403/404/422/429 and respect rate-limit headers.
- Cache monthly data and invalidate on observed effective date changes.
FAQ
Q: What unit does RIKSBANK_REPO use?
A: Percent per annum. For calculations, convert to a fraction by dividing by 100; for monthly interest, divide again by 12.
Q: How do I know the operative date for the latest rate?
A: Read dates.RIKSBANK_REPO from the latest endpoint. That effective date is the policy rate you should treat as active for that period.
Q: Why do I see repeated values across multiple days in timeseries?
A: The symbol’s frequency is monthly; between policy changes, the rate can remain constant. The API may return the same value across multiple calendar dates in the period.
Q: What happens if I query a historical date with no entry?
A: For monthly symbols, the API uses the last day with data within that month. If the range is outside available history, you may receive a 404 with details.
Q: Can I compute a mortgage payment directly from the API response?
A: Yes. Fetch the percent rate, convert to a monthly fraction r = (rate/100)/12, then use Payment = A × r ÷ (1 − (1 + r)^(−n)). Alternatively, use the convert endpoint for simple-loan interest comparisons.
Ship your integration today: fetch the Riksbank Repo Rate via the endpoints above and wire it into your pricing, risk, and analytics workflows. Register for an API key and explore more at interestratesapi.com.