Saudi Arabia is the largest economy in the Gulf and one of the world’s largest oil exporters, and its riyal has been pegged to the US dollar for decades. For developers building payroll, payments or e-commerce for the Saudi market, that means SAR/USD is effectively constant – but SAR/EUR, SAR/INR, SAR/EGP or SAR/GBP move every day with the dollar. The fxapi SAR exchange rate API returns all of them, live and back to 1999.
SAR facts for developers
- Where it’s used: Saudi Arabia.
- Symbol and formatting:
ر.سin Arabic,SARorSRin English-language contexts, e.g.SAR 1,500.00. A new official riyal symbol was introduced in 2025 and may not render in older fonts. Note that thear-SAlocale formats numbers with Arabic-Indic digits by default in many environments. - Minor unit: 2 decimals (halalas).
- Central bank: the Saudi Central Bank, still abbreviated SAMA from its former name, Saudi Arabian Monetary Authority (renamed in 2020).
- Regime: a conventional peg at 3.75 SAR per US dollar since 1986.
- Events in the historical data: after OPEC decided not to cut production on 27 November 2014, oil prices fell steeply – the following day, 28 November 2014, is the sample date on this page. Forward markets priced some devaluation risk during the 2015–2016 oil slump, but the spot peg held throughout, as it did in 2008 and 2020.
Get SAR rates with the fxapi API
/v1/convert (Basic plan and up) returns converted amounts. This Ruby script converts a riyal salary into the currencies of common payroll corridors and checks the peg:
require "net/http"
require "json"
def fxapi(path, params)
uri = URI("https://api.fxapi.com/v1/#{path}")
uri.query = URI.encode_www_form(params)
req = Net::HTTP::Get.new(uri)
req["apikey"] = ENV.fetch("FXAPI_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "fxapi returned #{res.code}" unless res.is_a?(Net::HTTPSuccess)
JSON.parse(res.body)["data"]
end
converted = fxapi("convert", base_currency: "SAR", value: 4500, currencies: "INR,EGP,PKR,USD")
converted.each do |code, item|
puts format("SAR 4,500.00 = %.2f %s", item["value"], code)
end
sar_per_usd = 4500 / converted.dig("USD", "value")
puts format("Implied USD/SAR %.4f (official peg 3.7500)", sar_per_usd)
On the Free plan, fetch /v1/latest and multiply yourself. See the currency converter API, fintech and payments and the Ruby guide. The neighboring UAE dirham works the same way.
Things to watch
- Use fetched rates, not the peg constant, for actual conversions – and store the rate with each transaction.
- Digits and direction. Arabic-Indic digits and right-to-left layout need explicit testing; pass a
numberingSystemoption if you need Latin digits. - Round late. Keep full precision until the final halala rounding – see currency rounding and precision.
Popular SAR pairs
Request any of these pairs – or any other combination of the 190+ supported currencies – with base_currency=SAR:
| Pair | Latest rate request |
|---|---|
| SAR/USD | /v1/latest?base_currency=SAR¤cies=USD |
| SAR/EUR | /v1/latest?base_currency=SAR¤cies=EUR |
| SAR/AED | /v1/latest?base_currency=SAR¤cies=AED |
| SAR/GBP | /v1/latest?base_currency=SAR¤cies=GBP |
| SAR/INR | /v1/latest?base_currency=SAR¤cies=INR |
| SAR/CNY | /v1/latest?base_currency=SAR¤cies=CNY |
| SAR/EGP | /v1/latest?base_currency=SAR¤cies=EGP |
Monthly averages and fluctuation for SAR
# Monthly average SAR 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=SAR -d currencies=USD,EUR,AED \
-H "apikey: $FXAPI_KEY"
# How did SAR 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=SAR -d currencies=USD,EUR,AED \
-H "apikey: $FXAPI_KEY"See the historical exchange rates API, average rates API and documentation for every parameter.
SAR is one of 190+ currencies in fxapi, the FX 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 SAR to USD exchange rate via API?
/v1/latest?base_currency=SAR¤cies=USD with your key in the apikey header. The value is US dollars per 1 riyal – about 0.2667, the inverse of the 3.75 peg.Is the Saudi riyal pegged to the US dollar?
Does fxapi have riyal rates before 1999?
Which symbol should I show for the riyal?
SAR or SR; Arabic text uses ر.س. The Saudi Central Bank introduced a new official riyal symbol in 2025 – check font support before relying on it.Can I convert a riyal amount in one call?
/v1/convert?base_currency=SAR&value=1500¤cies=EUR,INR returns converted amounts on the Basic plan and above.