You need to programmatically fetch the South African Reserve Bank’s repo rate and power loan models, dashboards, and risk analytics with a reliable, production-ready API. By the end of this guide, you will query SARB_REPO_RATE from the Interest Rates API, interpret its effective dates and units, compute spreads and payments from the returned value, and integrate all seven endpoints (latest, historical, time series, fluctuation, OHLC, convert, symbols) into your fintech stack.
What SARB_REPO_RATE Represents and Why It Matters
SARB_REPO_RATE is the South African Reserve Bank’s policy repo rate. It is the anchor for South African money markets and a primary driver of lending benchmarks, funding costs, and mortgage rates in ZAR. When the SARB adjusts the repo rate, it transmits into short-term money market rates and bank prime lending rates, affecting consumer and corporate financing.
Inside the Interest Rates API, SARB_REPO_RATE is a central bank benchmark with a monthly publication cadence. The API returns values as percentages (e.g., 7.25 means 7.25% annualized). For monthly symbols, effective dates align to the last available business day of the month. Use the dates map to bind each observation to its effective date.
Reference: learn more and explore endpoints at interestratesapi.com and the MCP. When you’re ready, Register to obtain your API key.
Data Model Basics for Developers
Endpoints return JSON shaped consistently across symbols. Key fields you will use:
- rates: A map from symbol to numeric rate value (percentage per annum).
- dates: A map from symbol to ISO date (Y-m-d) for the latest effective observation, helpful for monthly series.
- currencies: A map from symbol to its currency code; SARB_REPO_RATE is ZAR in the official sample.
- frequencies: In time series, a per-symbol frequency (e.g., daily) that reflects the representation returned by the API. For monthly symbols, repeated daily entries may carry the same monthly value within a month.
- For fluctuation: start_date, end_date, start_value, end_value, change, change_pct, high, low.
- For OHLC: period label, open/high/low/close, and data_points (count of aggregated points).
All requests use GET with an api_key query parameter, never headers. The base URL for every request is https://interestratesapi.com/api/v1/
Latest: Retrieve the Most Recent SARB_REPO_RATE
Use latest when you need the most current repo rate for calculations such as interest accruals, dashboards, and decisioning systems. The rate is expressed as a percentage per annum.
cURL
curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=SARB_REPO_RATE"
JSON response (official sample)
{
"success": true,
"date": "2026-09-30",
"base": "ZAR",
"rates": {
"SARB_REPO_RATE": 7.25
},
"dates": {
"SARB_REPO_RATE": "2026-09-30"
},
"currencies": {
"SARB_REPO_RATE": "ZAR"
},
"base_filter_note": null
}
How to read this:
- rates.SARB_REPO_RATE is the annualized repo rate as a percentage.
- dates.SARB_REPO_RATE is the effective date for that observation. For monthly series, this typically corresponds to the last business day with data in that month.
- currencies.SARB_REPO_RATE confirms the currency context (ZAR).
Python (requests)
import requests
url = 'https://interestratesapi.com/api/v1/latest'
params = {'symbols': 'SARB_REPO_RATE', 'api_key': 'YOUR_API_KEY'}
resp = requests.get(url, params=params)
data = resp.json()
rate = data['rates']['SARB_REPO_RATE']
effective_date = data['dates']['SARB_REPO_RATE']
currency = data['currencies']['SARB_REPO_RATE']
print(rate, effective_date, currency)
JavaScript (fetch)
const response = await fetch(
'https://interestratesapi.com/api/v1/latest?symbols=SARB_REPO_RATE&api_key=YOUR_API_KEY'
);
const data = await response.json();
const rate = data.rates.SARB_REPO_RATE;
const effectiveDate = data.dates.SARB_REPO_RATE;
const currency = data.currencies.SARB_REPO_RATE;
console.log(rate, effectiveDate, currency);
PHP
<?php
$url = 'https://interestratesapi.com/api/v1/latest?symbols=SARB_REPO_RATE&api_key=YOUR_API_KEY';
$json = file_get_contents($url);
$data = json_decode($json, true);
$rate = $data['rates']['SARB_REPO_RATE'];
$effectiveDate = $data['dates']['SARB_REPO_RATE'];
$currency = $data['currencies']['SARB_REPO_RATE'];
echo $rate . ' ' . $effectiveDate . ' ' . $currency;
?>
Historical: Value on a Specific Date
Use historical to pin a snapshot to a date for audits, backtesting, or reproducible research. For monthly symbols, the API returns the last date with data within that month (so mid-month queries resolve to the month’s observation if available).
cURL
JSON response
Note: The sample shows a base of USD for illustration. Your application should treat the numeric value as a percentage and handle currency context via the currencies map. Values are illustrative as provided in the sample.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/historical',
params={'date': '2025-06-15', 'symbols': 'SARB_REPO_RATE', 'api_key': 'YOUR_KEY'}
)
data = resp.json()
value = data['rates']['SARB_REPO_RATE']
print(value)
JavaScript
const url = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=SARB_REPO_RATE&api_key=YOUR_KEY';
const res = await fetch(url);
const data = await res.json();
console.log(data.rates.SARB_REPO_RATE);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=SARB_REPO_RATE&api_key=YOUR_KEY';
$d = json_decode(file_get_contents($u), true);
echo $d['rates']['SARB_REPO_RATE'];
?>
Time Series: Structured History for Modeling
Use timeseries to assemble model inputs, do event studies, and compute rolling aggregates. For monthly symbols, many dates within a month can hold the same value, allowing you to use period aggregation without gaps.
cURL
JSON response
Key fields:
- rates.SARB_REPO_RATE: map of date to value. For a monthly benchmark, consecutive days often repeat within the same month, which is expected.
- frequencies.SARB_REPO_RATE: frequency of the returned series.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/timeseries',
params={'start': '2025-10-24', 'end': '2026-10-24', 'symbols': 'SARB_REPO_RATE', 'api_key': 'YOUR_KEY'}
)
ts = resp.json()
series = ts['rates']['SARB_REPO_RATE']
for d, v in series.items():
pass # iterate for analytics
JavaScript
const tsRes = await fetch(
'https://interestratesapi.com/api/v1/timeseries?start=2025-10-24&end=2026-10-24&symbols=SARB_REPO_RATE&api_key=YOUR_KEY'
);
const ts = await tsRes.json();
Object.entries(ts.rates.SARB_REPO_RATE).forEach(([date, value]) => {
// use date, value
});
PHP
<?php
$url = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-24&end=2026-10-24&symbols=SARB_REPO_RATE&api_key=YOUR_KEY';
$data = json_decode(file_get_contents($url), true);
$series = $data['rates']['SARB_REPO_RATE'];
foreach ($series as $date => $value) {
// process
}
?>
Fluctuation: Changes, Highs, and Lows over a Range
Use fluctuation to summarize changes over a period for monitoring, risk reporting, and strategy triggers.
cURL
JSON response
How to use it:
- change: absolute change over the window.
- change_pct: percentage change; may be null if start_value is 0.
- high/low: extrema for the symbol during the period.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/fluctuation',
params={'start': '2025-10-24', 'end': '2026-10-24', 'symbols': 'SARB_REPO_RATE', 'api_key': 'YOUR_KEY'}
)
fx = resp.json()['rates']['SARB_REPO_RATE']
print(fx['change'], fx['change_pct'], fx['high'], fx['low'])
JavaScript
const fRes = await fetch(
'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-24&end=2026-10-24&symbols=SARB_REPO_RATE&api_key=YOUR_KEY'
);
const f = await fRes.json();
const stats = f.rates.SARB_REPO_RATE;
console.log(stats.change, stats.change_pct, stats.high, stats.low);
PHP
<?php
$url = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-24&end=2026-10-24&symbols=SARB_REPO_RATE&api_key=YOUR_KEY';
$j = json_decode(file_get_contents($url), true);
$s = $j['rates']['SARB_REPO_RATE'];
echo $s['change'] . ' ' . $s['change_pct'];
?>
OHLC: Candlesticks for Charting and Aggregation
OHLC is computed on the fly from daily data to support charting libraries and regime detection. For monthly symbols, the period aggregation still reflects the open/high/low/close within each requested aggregation period.
cURL
JSON response
data_points indicates how many daily observations were aggregated for the candlestick.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/ohlc',
params={'symbols': 'SARB_REPO_RATE', 'period': 'monthly', 'start': '2025-10-24', 'end': '2026-10-24', 'api_key': 'YOUR_KEY'}
)
ohlc = resp.json()['rates']['SARB_REPO_RATE']
for bar in ohlc:
pass # bar['open'], bar['high'], bar['low'], bar['close']
JavaScript
const ohlcUrl = 'https://interestratesapi.com/api/v1/ohlc?symbols=SARB_REPO_RATE&period=monthly&start=2025-10-24&end=2026-10-24&api_key=YOUR_KEY';
const ohlcRes = await fetch(ohlcUrl);
const ohlcData = await ohlcRes.json();
ohlcData.rates.SARB_REPO_RATE.forEach(candle => {
// use candle.open/high/low/close
});
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/ohlc?symbols=SARB_REPO_RATE&period=monthly&start=2025-10-24&end=2026-10-24&api_key=YOUR_KEY';
$d = json_decode(file_get_contents($u), true);
foreach ($d['rates']['SARB_REPO_RATE'] as $bar) {
// $bar['open'], $bar['close']
}
?>
Convert: Compare Loan Interest Costs Across Benchmarks
Use convert to compare the total interest cost of a simple loan priced at the latest rates of two benchmarks. It returns total_interest and total_payment for the given amount and term_months. This is useful to quantify the spread impact between SARB_REPO_RATE and another benchmark (e.g., ECB_MRO) when modeling cross-border funding or pricing alternatives.
cURL
JSON response
Reading this:
- from and to contain the latest rate snapshots and simple-loan interest math for the same amount and term_months.
- difference.rate_spread is the simple arithmetic spread between the two latest rates.
- interest_saved quantifies the impact of choosing the lower-cost rate under the simple-loan assumption in the endpoint.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/convert',
params={'from': 'SARB_REPO_RATE', 'to': 'ECB_MRO', 'amount': 100000, 'term_months': 12, 'api_key': 'YOUR_KEY'}
)
cmp = resp.json()
print(cmp['difference']['rate_spread'], cmp['difference']['interest_saved'])
JavaScript
const conv = await fetch(
'https://interestratesapi.com/api/v1/convert?from=SARB_REPO_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY'
).then(r => r.json());
console.log(conv.difference.rate_spread, conv.difference.interest_saved);
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/convert?from=SARB_REPO_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY';
$j = json_decode(file_get_contents($u), true);
echo $j['difference']['rate_spread'] . ' ' . $j['difference']['interest_saved'];
?>
Symbols: Discover Available Benchmarks
Use symbols to browse the catalogue and programmatically verify that a symbol exists before calling other endpoints. You can filter by category, base currency, and provider.
cURL
JSON response
In your application, filter for "SARB_REPO_RATE" when building symbol pickers or validating inputs. See also the Interest Rates API site for a broader overview.
Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/symbols',
params={'category': 'central_bank', 'base': 'USD', 'api_key': 'YOUR_KEY'}
)
symbols = resp.json()['symbols']
JavaScript
const s = await fetch(
'https://interestratesapi.com/api/v1/symbols?category=central_bank&base=USD&api_key=YOUR_KEY'
).then(r => r.json());
console.log(s.symbols.map(x => x.symbol));
PHP
<?php
$u = 'https://interestratesapi.com/api/v1/symbols?category=central_bank&base=USD&api_key=YOUR_KEY';
$d = json_decode(file_get_contents($u), true);
foreach ($d['symbols'] as $sym) {
// $sym['symbol']
}
?>
How to Use SARB_REPO_RATE in Your Calculations
All API numeric values are percentages. If you need a rate in decimal form for formulas, divide by 100 (e.g., 7.25% becomes 0.0725). Effective dates are ISO strings (Y-m-d), and for monthly benchmarks, you should treat the value as applicable for that month as of the last day with data.
- Compute a spread: spread = latest(SARB_REPO_RATE) − latest(other_rate). The /convert endpoint already surfaces a simple spread in difference.rate_spread.
- Monthly payment (amortizing loan): given principal P, annual rate r_pct, monthly rate i = (r_pct / 100) / 12, term n in months, payment = P * i / (1 − (1 + i)^(-n)). Use the API’s latest value for r_pct and your product’s term.
- Simple interest over m months: interest = P * (r_pct / 100) * (m / 12). This mirrors the simple-loan model returned by /convert.
Tip for time series: if your model requires a single observation per month, aggregate daily entries by month and take the last value. The OHLC endpoint can also provide a monthly close directly.
Operational Notes: Frequency, Business Days, Caching, and Errors
- Publication: SARB_REPO_RATE is monthly in the API. For a given month, the API uses the last day with data within that month for historical queries.
- Business days: When you request a mid-month date via /historical, you receive the last available observation in that month, which aligns with typical central bank schedule representation.
- Caching: For dashboards, cache /latest results until your next polling interval or until you detect a date change in dates.SARB_REPO_RATE. For history, cache immutable past months to reduce calls.
- Rate limits: On 429 responses, use Retry-After and X-RateLimit-* headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) to backoff and retry appropriately.
- Errors: The API returns success=false with an error message for 401 (api_key problems), 403 (inactive account), 404 (no symbol or no data for date/range; may include details), 422 (validation errors like date format), 429 (quota). Always inspect the JSON error payload before retrying.
Real-World Use Cases for SARB_REPO_RATE
- Loan pricing and reprice engines: Pull /latest and /historical to reprice variable-rate loans indexed to SARB_REPO_RATE.
- Risk and ALM dashboards: Combine /fluctuation and /ohlc to visualize policy cycles and quantify exposure to repo rate shifts.
- Treasury funding analysis: Use /convert to estimate cost differences vs. alternative benchmarks when evaluating hedges or cross-currency structures.
- Macro and research workflows: Pull /timeseries for regime detection, impulse response work, and event studies around SARB decisions.
See endpoint references in the MCP and browse more benchmarks at interestratesapi.com.
FAQ
How is SARB_REPO_RATE expressed?
As an annualized percentage (e.g., 7.25 means 7.25% per annum). Convert to a decimal by dividing by 100 for calculations.
What date should I display for a monthly observation?
Use dates.SARB_REPO_RATE from /latest or the keys in the /timeseries map. For monthly symbols, this will be the last day with data within that month.
How often should I refresh the latest SARB_REPO_RATE?
It’s monthly, but you can poll daily and cache results until dates.SARB_REPO_RATE changes. For rate-limited environments, poll less frequently and respect 429 Retry-After headers.
How do I compute a payment using the API value?
From /latest, take r_pct, compute i = (r_pct / 100) / 12, and apply the standard amortization formula payment = P * i / (1 − (1 + i)^(-n)).
Can I chart monthly bars?
Yes. Use /ohlc with period=monthly, or aggregate /timeseries by month and take the last value as the monthly close.
Build your SARB_REPO_RATE integration now. Get your API key and ship your first request in minutes: Register. Explore schema details and endpoints in the MCP and the main site at interestratesapi.com.