API to Get the SARB (SARB_REPO_RATE) Rate

API to Get the SARB (SARB_REPO_RATE) Rate

You need a reliable way to programmatically fetch the South African Reserve Bank repo rate for underwriting, treasury dashboards, or macro models. By the end of this guide, you will be able to query the SARB_REPO_RATE from the Interest Rates API, interpret the response (units, effective dates, frequency), compute basic spreads and loan payments from the returned value, and integrate all seven endpoints into your fintech workflow.

What SARB_REPO_RATE Represents and Why It Matters

SARB_REPO_RATE is the South African Reserve Bank’s key policy (repo) rate, used to steer short-term interest rates in the South African economy. It anchors borrowing costs across consumer loans, mortgages, working capital facilities, and discount rates used in valuation and risk. When SARB changes the repo rate, downstream benchmarks and prime-linked lending terms often adjust.

Illustration: API to Get the SARB (SARB_REPO_RATE) Rate

In the Interest Rates API, the SARB_REPO_RATE is categorized as a central bank rate, denominated in ZAR, with a monthly publication cadence. Developers typically use it for:

  • Pricing and repricing of ZAR-linked loans and credit products.
  • Macro research dashboards and alerting on policy changes.
  • Risk factor backtests and scenario analysis.
  • Treasury benchmarking and spread monitoring against interbank or sovereign yields.

Explore more at interestratesapi.com, and see the MCP for endpoint capabilities and response schemas.

How the Interest Rates API Expresses SARB_REPO_RATE

Base URL: https://interestratesapi.com/api/v1/. All endpoints are GET and authenticate with the api_key query parameter. Do not use headers for auth.

  • Units: rates are expressed as percentage values (e.g., 7.25 means 7.25% per annum).
  • Effective date: the dates map in responses specifies the effective date per symbol. For monthly series, the API uses the last day with data in that month for the historical endpoint.
  • Frequency: SARB_REPO_RATE is monthly at source. Some endpoints can present daily time steps by carrying the monthly value across applicable business days. Use the frequencies map (when present) to understand the series frequency returned.
  • Business days: central bank rates do not trade daily like market rates. When a daily series is returned, unchanged values may repeat across business days until the next decision date.
  • Caching: cache stable historical requests aggressively. For the latest endpoint, revalidate on your own cadence (e.g., once per day or around known policy meeting windows). Include ETag/Last-Modified logic in your client if you proxy responses.
  • Time zone: dates are returned in YYYY-MM-DD without explicit time zone. Treat them as effective local dates for the issuing authority unless otherwise indicated.

To build, test, and deploy quickly, Register for an API key and start calling endpoints in minutes. You can also visit the homepage for product context, or Get started with Interest Rates API.

Endpoint 1: Symbols — Discover SARB_REPO_RATE

Use the symbols catalogue to programmatically verify that SARB_REPO_RATE exists, confirm metadata, and filter by category or currency.

cURL

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

Python (requests)

import requests

url = "https://interestratesapi.com/api/v1/symbols"
params = {
"category": "central_bank",
"base": "ZAR",
"api_key": "YOUR_KEY"
}
resp = requests.get(url, params=params)
symbols = resp.json()
print(symbols.get("success"), symbols.get("count"))

JavaScript (fetch)

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

PHP

<?php
$url = "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=ZAR&api_key=YOUR_KEY";
$json = file_get_contents($url);
$data = json_decode($json, true);
echo $data["success"] ? "ok" : "error";

Sample JSON

{
    "success": true,
    "date": "2026-10-31",
    "base": "ZAR",
    "rates": {
        "SARB_REPO_RATE": 7.25
    },
    "dates": {
        "SARB_REPO_RATE": "2026-10-31"
    },
    "currencies": {
        "SARB_REPO_RATE": "ZAR"
    },
    "base_filter_note": null
}

Field notes: symbols is a list of metadata objects. For SARB_REPO_RATE, you can expect category=central_bank and currency_code=ZAR. Frequency describes the data cadence at source.

Endpoint 2: Latest — Get the Current SARB_REPO_RATE

This endpoint returns the most recent available value, with per-symbol dates and currencies when requested with multiple symbols. Below is the official sample you should use to test your integration.

Official cURL (copy-paste)

Official JSON Response

How to read it:

  • rates.SARB_REPO_RATE is the policy rate in percent per annum.
  • dates.SARB_REPO_RATE is the effective date for the rate you received.
  • currencies.SARB_REPO_RATE is the currency context (ZAR).
  • date at the root is the snapshot date of the latest payload.

Python (requests)

import requests

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

rate = data["rates"]["SARB_REPO_RATE"]
effective_date = data["dates"]["SARB_REPO_RATE"]
currency = data["currencies"]["SARB_REPO_RATE"]
print(f"SARB_REPO_RATE {rate}% (effective {effective_date}, currency {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 eff = data.dates.SARB_REPO_RATE;
console.log(`SARB_REPO_RATE: ${rate}% effective ${eff}`);

PHP

<?php
$u = "https://interestratesapi.com/api/v1/latest?symbols=SARB_REPO_RATE&api_key=YOUR_API_KEY";
$j = file_get_contents($u);
$d = json_decode($j, true);
$rate = $d["rates"]["SARB_REPO_RATE"];
$eff = $d["dates"]["SARB_REPO_RATE"];
echo "SARB_REPO_RATE={$rate}% effective {$eff}";

Endpoint 3: Historical — Value on a Specific Date

Query the rate as of a target date. For monthly symbols, the API uses the last day with data within that month.

cURL

Python (requests)

import requests

params = {"date": "2025-06-15", "symbols": "SARB_REPO_RATE", "api_key": "YOUR_KEY"}
r = requests.get("https://interestratesapi.com/api/v1/historical", params=params)
h = r.json()
value = h["rates"]["SARB_REPO_RATE"]
print("Value on 2025-06-15:", value)

JavaScript (fetch)

const histRes = await fetch(
"https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=SARB_REPO_RATE&api_key=YOUR_KEY"
);
const hist = await histRes.json();
console.log("Historical:", hist.rates.SARB_REPO_RATE);

PHP

<?php
$hurl = "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=SARB_REPO_RATE&api_key=YOUR_KEY";
$j = file_get_contents($hurl);
$d = json_decode($j, true);
echo $d["rates"]["SARB_REPO_RATE"];

Sample JSON

Note the monthly rule: if you request a day inside a month and SARB publishes monthly, the API returns the rate associated with the latest available date within that month. Use the returned rate and the date key (if provided) to record provenance in your system.

Endpoint 4: Time Series — Build a SARB_REPO_RATE History

Fetch a range to power charts and backtests. Even for monthly symbols, some responses will present daily steps; unchanged values may be repeated across business days.

cURL

Python (requests)

import requests

p = {
"start": "2025-11-07",
"end": "2026-11-07",
"symbols": "SARB_REPO_RATE",
"api_key": "YOUR_KEY"
}
ts = requests.get("https://interestratesapi.com/api/v1/timeseries", params=p).json()
series = ts["rates"]["SARB_REPO_RATE"]
for d, v in list(series.items())[:5]:
print(d, v)

JavaScript (fetch)

const tsRes = await fetch(
"https://interestratesapi.com/api/v1/timeseries?start=2025-11-07&end=2026-11-07&symbols=SARB_REPO_RATE&api_key=YOUR_KEY"
);
const tsData = await tsRes.json();
const points = tsData.rates["SARB_REPO_RATE"];
console.log(Object.keys(points).slice(0, 3).map(d => [d, points[d]]));

PHP

<?php
$tsurl = "https://interestratesapi.com/api/v1/timeseries?start=2025-11-07&end=2026-11-07&symbols=SARB_REPO_RATE&api_key=YOUR_KEY";
$j = file_get_contents($tsurl);
$d = json_decode($j, true);
$series = $d["rates"]["SARB_REPO_RATE"];
foreach (array_slice($series, 0, 3, true) as $date => $val) {
echo $date . ": " . $val . PHP_EOL;
}

Sample JSON

Key fields: rates is a nested map {symbol: {date: value}}. frequencies can indicate how the series is presented (here daily). Use start_date and end_date to confirm the covered range.

Endpoint 5: Fluctuation — Change Statistics Over a Period

Compute period-over-period change, percentage move, and range for SARB_REPO_RATE. Helpful for risk reports and alerting.

cURL

Python (requests)

import requests

params = {
"start": "2025-11-07",
"end": "2026-11-07",
"symbols": "SARB_REPO_RATE",
"api_key": "YOUR_KEY"
}
f = requests.get("https://interestratesapi.com/api/v1/fluctuation", params=params).json()
stats = f["rates"]["SARB_REPO_RATE"]
print("Change:", stats["change"], "Change%:", stats["change_pct"])

JavaScript (fetch)

const flRes = await fetch(
"https://interestratesapi.com/api/v1/fluctuation?start=2025-11-07&end=2026-11-07&symbols=SARB_REPO_RATE&api_key=YOUR_KEY"
);
const fl = await flRes.json();
const s = fl.rates.SARB_REPO_RATE;
console.log(s.start_value, s.end_value, s.change, s.change_pct);

PHP

<?php
$url = "https://interestratesapi.com/api/v1/fluctuation?start=2025-11-07&end=2026-11-07&symbols=SARB_REPO_RATE&api_key=YOUR_KEY";
$d = json_decode(file_get_contents($url), true);
$s = $d["rates"]["SARB_REPO_RATE"];
echo "Δ=" . $s["change"] . " Δ%=" . $s["change_pct"];

Sample JSON

Field notes: change is end_value - start_value; change_pct is the percent move relative to start_value (null if start_value is 0). High and low are the extrema in the period.

Endpoint 6: OHLC — Candlestick Aggregations

Generate open-high-low-close aggregations for SARB_REPO_RATE over weekly, monthly, or quarterly buckets. This is computed from daily observations on the fly.

cURL

Python (requests)

import requests

params = {
"symbols": "SARB_REPO_RATE",
"period": "monthly",
"start": "2025-11-07",
"end": "2026-11-07",
"api_key": "YOUR_KEY"
}
ohlc = requests.get("https://interestratesapi.com/api/v1/ohlc", params=params).json()
bars = ohlc["rates"]["SARB_REPO_RATE"]
for b in bars[:1]:
print(b["period"], b["open"], b["high"], b["low"], b["close"], b["data_points"])

JavaScript (fetch)

const ohlcRes = await fetch(
"https://interestratesapi.com/api/v1/ohlc?symbols=SARB_REPO_RATE&period=monthly&start=2025-11-07&end=2026-11-07&api_key=YOUR_KEY"
);
const ohlcData = await ohlcRes.json();
console.log(ohlcData.rates["SARB_REPO_RATE"][0]);

PHP

<?php
$u = "https://interestratesapi.com/api/v1/ohlc?symbols=SARB_REPO_RATE&period=monthly&start=2025-11-07&end=2026-11-07&api_key=YOUR_KEY";
$o = json_decode(file_get_contents($u), true);
$first = $o["rates"]["SARB_REPO_RATE"][0];
echo implode(", ", ["period=".$first["period"], "O=".$first["open"], "H=".$first["high"], "L=".$first["low"], "C=".$first["close"]]);

Sample JSON

Field notes: period is the aggregation bucket (YYYY-MM for monthly). data_points is the count of source observations used to compute the OHLC for that bucket.

Endpoint 7: Convert — Compare Total Interest Cost Against Another Rate

The convert endpoint compares simple-loan interest cost at the latest rate for two symbols. This helps quantify spreads in terms that end-users understand (total interest and total payment).

cURL

Python (requests)

import requests

params = {
"from": "SARB_REPO_RATE",
"to": "ECB_MRO",
"amount": 100000,
"term_months": 12,
"api_key": "YOUR_KEY"
}
conv = requests.get("https://interestratesapi.com/api/v1/convert", params=params).json()
print(conv["from"]["rate"], conv["to"]["rate"], conv["difference"]["rate_spread"])

JavaScript (fetch)

const convRes = await fetch(
"https://interestratesapi.com/api/v1/convert?from=SARB_REPO_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"
);
const conv = await convRes.json();
console.log(conv.from.rate, conv.to.rate, conv.difference.rate_spread);

PHP

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

Sample JSON

Field notes: rate_spread is from.rate - to.rate. total_interest and total_payment correspond to a simple (non-amortizing) calculation over term_months at the latest rates. Use this endpoint for quick cross-benchmark comparisons in UI flows.

How to Compute a Spread or a Monthly Payment from SARB_REPO_RATE

You can compute these client-side with the values returned by the API, without hardcoding numbers.

  • Spread versus another benchmark: spread = sarb_repo_rate - other_rate. Read both from data.rates maps, or use /convert for a precomputed rate_spread.
  • Simple interest over N months: total_interest = principal × (rate/100) × (N/12). Monthly simple interest = (principal × (rate/100)) / 12.
  • Amortizing loan monthly payment (annuity): payment = P × r_m / (1 - (1 + r_m)^(-N)), where r_m = (rate/100)/12, P is principal, N is number of months. Make sure to use the rate (%) returned by the API converted to a fraction.

Example pattern in code using the latest endpoint output:

JavaScript: amortizing payment from the returned rate

function amortizingPayment(principal, annualRatePct, termMonths) {
const r = (annualRatePct / 100) / 12;
if (r === 0) return principal / termMonths;
return principal * r / (1 - Math.pow(1 + r, -termMonths));
}

// Assume you fetched data via /latest
// const rate = data.rates.SARB_REPO_RATE;
const principal = 500000; // ZAR
const term = 240; // 20 years
// const payment = amortizingPayment(principal, rate, term);

Integration Tips: Reliability, Errors, and Rate Limits

Plan for HTTP and semantic errors as part of your production pipeline.

  • Authentication: always pass api_key as a query parameter. 401 indicates a missing or invalid key; 403 indicates an account without an active plan.
  • Validation: 422 for malformed dates (use YYYY-MM-DD), unknown symbols, or invalid numeric parameters.
  • Data availability: 404 if no symbols matched or no data existed for the requested range/date; details may include available ranges. For SARB_REPO_RATE, ensure your requested dates cover months where data exists.
  • Quotas: 429 responses include Retry-After and X-RateLimit-* headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset). Back off and retry after the advised interval.
  • Caching: cache historical ranges, invalidate around policy meeting dates, and consolidate multiple symbol requests where possible to reduce call volume.

Refer to Interest Rates API MCP for endpoint details and error shapes. When in doubt, log the full response body (it includes success and error fields) for troubleshooting.

Real-World Use Cases for SARB_REPO_RATE

  • Credit pricing engines: fetch the latest SARB_REPO_RATE, add a strategy margin, compute amortizing payments, and render disclosures.
  • Treasury dashboards: timeseries charts augmented by OHLC to visualize periods of stability versus tightening/loosening cycles.
  • Macro research: combine historical and fluctuation endpoints to summarize year-to-date changes, highs, and lows for reports.
  • Risk models: use historical series and OHLC to estimate transition probabilities of rate regimes or to stress test interest-sensitive assets.
  • Comparative tools: use convert to show how total interest differs between SARB_REPO_RATE and another policy rate for a simple term loan.

To start integrating SARB_REPO_RATE into your platform, Register for Interest Rates API or Get started with Interest Rates API. For platform-level references, visit interestratesapi.com.

FAQ

What is the unit of SARB_REPO_RATE?
The value is a percentage per annum (e.g., 7.25 means 7.25% p.a.). Convert to a monthly fraction by dividing by 100 and then by 12.

How often is SARB_REPO_RATE updated?
It has a monthly cadence in the API. Policy changes occur as decided by SARB; use the latest endpoint for the current effective value and timeseries or historical to align with target dates.

How do I interpret effective dates?
Use the dates map in the latest response to read the per-symbol effective date. For historical monthly requests, the last day with data in that month is applied.

Can I use this rate directly in loan calculators?
Yes. Convert the percent to a fraction and apply either simple or amortizing formulas. For cross-rate comparisons and simple total interest over a fixed term, the convert endpoint provides a fast answer.

What should I do on 404 or 422 errors?
Validate symbols (SARB_REPO_RATE), ensure YYYY-MM-DD formatting, and use a date range where data exists. Inspect the error message (and optional details) to adjust queries.

If you’re ready to integrate SARB_REPO_RATE into underwriting, analytics, or treasury tools, grab an API key now: Register. For the full list of capabilities and schema references, see the MCP.

Ready to get started?

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

Get API Key