If you load the Saudi Central Bank (SAMA) exchange rate table into a database for a few weeks, two things stand out.
First, there is a row for every calendar day. Most central banks skip weekends; SAMA doesn't. Second, three days in a row carry exactly the same numbers. Here is the euro against the riyal from SAMA's own table for the week of 20 November 2026:
| SAMA table dated | Day | EUR → SAR |
|---|---|---|
| 2026-11-20 | Fri | 4.11825 |
| 2026-11-21 | Sat | 4.11843 |
| 2026-11-22 | Sun | 4.11843 |
| 2026-11-23 | Mon | 4.11843 |
| 2026-11-24 | Tue | 4.08618 |
| 2026-11-25 | Wed | 4.11393 |
| 2026-11-26 | Thu | 4.10568 |
Saturday, Sunday and Monday are identical. Tuesday is the first table that moves.
What the date on a SAMA table actually means
The riyal is pegged at 3.75 to the US dollar, so dividing the EUR/SAR figure by 3.75 gives the euro-dollar rate SAMA used. Lining that up against the ECB's daily reference rate for the same week:
| Date | SAMA EUR/SAR ÷ 3.75 | ECB EUR/USD that day |
|---|---|---|
| Fri 20 Nov | 1.0982 | 1.0990 |
| Mon 23 Nov | 1.0982 | 1.0939 |
| Tue 24 Nov | 1.0896 | 1.0963 |
| Wed 25 Nov | 1.0970 | 1.0935 |
| Thu 26 Nov | 1.0948 | (not out yet) |
The SAMA table dated Wednesday (1.0970) sits close to Tuesday's market (1.0963), and Thursday's (1.0948) is close to Wednesday's (1.0935). The Saturday-to-Monday run carries Friday's market. So in practice a SAMA table dated D usually reflects the previous trading day, and the weekend has no fresh market to report, which is why Monday's table can't move yet.
That's not a bug in the data. It's simply how SAMA dates its table, and it's worth knowing before you write any "pick the rate for this date" code.
Don't "fix" the lag
The tempting move is to shift every row back a day so it lines up with the market. Don't. The VAT Implementing Regulations in Saudi Arabia say a foreign-currency amount is converted to riyals at the daily rate prescribed by the Saudi Central Bank on the date the tax becomes due. The rate prescribed for 25 November is the row SAMA dated 25 November, whatever market moment it captured. If you shift the dates, your figures stop matching the official table an auditor or ZATCA would check against.
So the rule for your lookup is simple: take the row whose date equals the transaction date. Because SAMA prints every day, a weekend or holiday never needs a fallback, which is a nice change from most central banks.
Getting the table as JSON
SAMA's own site shows the table in a web page; there is no public API from the bank itself. AllRatesToday reads it daily and serves it with a free API key (register here, no card):
curl "https://allratestoday.com/api/v1/central-bank/sama/latest?source=EUR&target=SAR" \ -H "Authorization: Bearer YOUR_API_KEY" { "bank": "sama", "rate_date": "2026-11-26", "source": "EUR", "target": "SAR", "rate": 4.10568, "derived": false } derived: false means SAMA printed that pair itself. The table has 66 currencies, all quoted as riyals per one unit of the foreign currency.
Looking up the rate for an invoice date
For past dates there is a dated endpoint (on paid plans). A small helper that always returns the official row for the date you ask for:
const KEY = process.env.ALLRATES_KEY; async function samaRate(currency, date) { const url = `https://allratestoday.com/api/v1/central-bank/sama/${date}?source=${currency}&target=SAR`; const res = await fetch(url, { headers: { Authorization: `Bearer ${KEY}` } }); if (!res.ok) throw new Error(`SAMA lookup failed: ${res.status}`); const body = await res.json(); // SAMA dates every calendar day, so this should always be true. if (body.rate_date !== date) { console.warn(`asked for ${date}, got table dated ${body.rate_date}`); } return { rate: body.rate, rateDate: body.rate_date }; } const { rate } = await samaRate('EUR', '2026-11-22'); // a Sunday console.log(rate); // 4.11843, the same figure as Saturday and Monday Keep the warning in. If it ever fires, either the table for that day hasn't arrived yet (the new table usually shows up in the evening, Riyadh time) or something upstream changed, and you want to know before an invoice goes out.
Two practical notes
- Today's table arrives late in the day. If your system issues invoices in the morning, "today" may not exist yet. Decide up front whether you hold the invoice, or issue it and re-run the conversion once the table lands. Don't silently use yesterday's row.
- Store the rate with the invoice. Save the rate, the table date and the source next to the converted amount. ZATCA's e-invoice XML has no exchange-rate field, so the stored rate is the only way to show later how the riyal figure was reached.
The full SAMA table, history since April 2021 and the npm package are described on the SAMA exchange rate API page.

