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:
Rbefore the amount. South African conventions use a space as thousands separator and either a comma or a period as decimal separator, so bothR1 234,56andR1,234.56are 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,234could 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:
| Pair | Latest rate request |
|---|---|
| ZAR/USD | /v1/latest?base_currency=ZAR¤cies=USD |
| ZAR/EUR | /v1/latest?base_currency=ZAR¤cies=EUR |
| ZAR/GBP | /v1/latest?base_currency=ZAR¤cies=GBP |
| ZAR/CNY | /v1/latest?base_currency=ZAR¤cies=CNY |
| ZAR/BWP | /v1/latest?base_currency=ZAR¤cies=BWP |
| ZAR/NAD | /v1/latest?base_currency=ZAR¤cies=NAD |
| ZAR/JPY | /v1/latest?base_currency=ZAR¤cies=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?
/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?
base_currency=ZAR¤cies=NAD,LSL,SZL returns values of about 1.