Skip to content
South African Rand · ZAR

South African rand (ZAR) exchange rate API

South African rand rates against 190+ currencies – live, historical since 1999 and averaged – plus the Namibian dollar, Lesotho loti and Eswatini lilangeni, which are pegged to the rand at par.

CodeZAR
SymbolR
Decimals2
HistorySince 1999
GET /v1/latest · base ZAR
curl -G "https://api.fxapi.com/v1/latest" \
  -d base_currency=ZAR \
  -d currencies=USD,EUR,GBP,CNY \
  -H "apikey: $FXAPI_KEY"
# ZAR on a past date
curl -G "https://api.fxapi.com/v1/historical" \
  -d date=2001-12-20 -d base_currency=ZAR \
  -d currencies=USD \
  -H "apikey: $FXAPI_KEY"
ISO 4217 codeZAR
SymbolR
Minor unit2 decimals
IssuerSouth African Reserve Bank

The rand is Africa’s most traded currency and one of the more liquid emerging-market currencies globally, which also makes it one of the more volatile. South Africa’s commodity exports and its sensitivity to global risk sentiment show up clearly in USD/ZAR and EUR/ZAR. The fxapi ZAR exchange rate API returns rand rates against 190+ currencies, and covers the neighboring currencies tied to it.

ZAR facts for developers

  • Where it’s used: South Africa. Within the Common Monetary Area, the Namibian dollar (NAD), Lesotho loti (LSL) and Eswatini lilangeni (SZL) are pegged to the rand at par, and the rand also circulates in Namibia and Lesotho.
  • Symbol and formatting: R before the amount. South African conventions use a space as thousands separator and either a comma or a period as decimal separator, so both R1 234,56 and R1,234.56 are common – format consistently and always store the raw number.
  • Minor unit: 2 decimals (cents).
  • Central bank: the South African Reserve Bank (SARB).
  • Regime: free float with an inflation target, in place since 2000.
  • Events in the historical data: the rand slumped in late 2001, reaching a then-record low against the dollar in December 2001 – 20 December 2001 is the sample date on this page. It fell sharply again in the 2008 crisis and in December 2015, when the finance minister was abruptly replaced.

Get ZAR rates with the fxapi API

/v1/latest works on every plan. This PHP snippet fetches rand rates and checks that the Common Monetary Area pegs look right – a useful data-quality test for any pipeline that handles southern African currencies:

<?php
$query = http_build_query([
    'base_currency' => 'ZAR',
    'currencies'    => 'NAD,LSL,SZL,USD,EUR',
]);

$ch = curl_init("https://api.fxapi.com/v1/latest?$query");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['apikey: ' . getenv('FXAPI_KEY')],
    CURLOPT_TIMEOUT        => 10,
]);
$body   = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($status !== 200) {
    throw new RuntimeException("fxapi returned HTTP $status");
}

$data = json_decode($body, true)['data'];

foreach (['NAD', 'LSL', 'SZL'] as $code) {
    $value = $data[$code]['value'];
    $ok    = abs($value - 1) < 0.01 ? 'OK' : 'CHECK';
    printf("ZAR/%s %.4f  %s\n", $code, $value, $ok);
}
printf("USD/ZAR %.4f\n", 1 / $data['USD']['value']); // rand per dollar

Need a percentage move over a period? The fluctuation endpoint is free on every plan. See also the historical exchange rates API for single dates such as December 2001, the real-time exchange rates API for faster refreshes, and the PHP guide. For the bigger picture, read how exchange rates are determined.

Things to watch

  • Decimal separator ambiguity. R1,234 could mean one thousand or one point two – keep formatted strings out of your data layer.
  • High volatility. The rand can move several percent in days; refresh cached rates more often than for majors.
  • Peg check tolerance. Market rates for NAD, LSL and SZL can deviate marginally from exactly 1.

Popular ZAR pairs

Request any of these pairs – or any other combination of the 190+ supported currencies – with base_currency=ZAR:

PairLatest rate request
ZAR/USD/v1/latest?base_currency=ZAR&currencies=USD
ZAR/EUR/v1/latest?base_currency=ZAR&currencies=EUR
ZAR/GBP/v1/latest?base_currency=ZAR&currencies=GBP
ZAR/CNY/v1/latest?base_currency=ZAR&currencies=CNY
ZAR/BWP/v1/latest?base_currency=ZAR&currencies=BWP
ZAR/NAD/v1/latest?base_currency=ZAR&currencies=NAD
ZAR/JPY/v1/latest?base_currency=ZAR&currencies=JPY

Monthly averages and fluctuation for ZAR

# Monthly average ZAR rates for 2025 (IAS 21 / ASC 830)
curl -G "https://api.fxapi.com/v1/average" \
  -d date_from=2025-01-01 -d date_to=2025-12-31 -d period=month \
  -d base_currency=ZAR -d currencies=USD,EUR,GBP \
  -H "apikey: $FXAPI_KEY"

# How did ZAR move over the last year?
curl -G "https://api.fxapi.com/v1/fluctuation" \
  -d date_from=2025-10-01 -d date_to=2026-10-01 \
  -d base_currency=ZAR -d currencies=USD,EUR,GBP \
  -H "apikey: $FXAPI_KEY"

See the historical exchange rates API, average rates API and documentation for every parameter.

ZAR is one of 190+ currencies in fxapi, the foreign exchange rates API for developers – live rates, daily history since 1999 and monthly averages with one API key.

Frequently asked questions

How do I get the USD to ZAR exchange rate via API?
Request /v1/latest?currencies=ZAR with your key in the apikey header. With USD as the default base, the value is rand per 1 US dollar.
Are the Namibian dollar and Lesotho loti pegged to the rand?
Yes. NAD, LSL and SZL are pegged to the rand at 1:1 within the Common Monetary Area, so base_currency=ZAR&currencies=NAD,LSL,SZL returns values of about 1.
Does fxapi have rand rates before 1999?
No. Daily data starts on 1999-01-01.
Is the Botswana pula part of the rand area?
No. Botswana left the rand monetary area in the 1970s and manages the pula against a basket of currencies that includes the rand. BWP is available in fxapi as its own code.
Free plan · no credit card

Get your free exchange rate API key

300 requests a month, latest and historical rates, fluctuation and averages – free forever. Upgrade when you need faster updates or more requests.