Bank Al-Maghrib Exchange Rates Today & Official API

Official Bank Al-Maghrib rates for 26 Oct 2026: 1 USD = 9.8199 MAD, 1 EUR = 11.006 MAD. All 30 currencies published, history back to 2000. Free JSON API for tax, audits, and compliant invoicing.

By Madhushan, Founder & Lead Developer

Morocco flagBank Al-Maghrib publishes official daily exchange rates — 30 currencies against the MAD — and this API serves them as JSON, with history back to 2000. The latest table is on every plan. Get your API key.

About Bank Al-Maghrib

Bank Al-Maghrib publishes daily reference exchange rates (cours de référence) for the Moroccan dirham — around 30 currencies quoted against the dirham each business day around midday Rabat time. Under Morocco's managed-float regime it is the official benchmark Moroccan accounting, customs and contracts reference; the archive on the bank's site reaches back to 2000, with buy/sell quotes in the earlier years and a published mid rate since 2017.

Quick start

You need a free API key to run these. Register in under a minute — no card required.

Get a free API key Already registered? Copy your key from the dashboard.

One request for the pair you need — USD to MAD at the official Bank Al-Maghrib rate:

curl "https://allratestoday.com/api/v1/central-bank/bam/latest?source=USD&target=MAD" \
  -H "Authorization: Bearer art_live_your_key"

What comes back — a real response built from the table in force (2026-10-26):

{
  "bank": "bam",
  "name": "Bank Al-Maghrib",
  "rate_date": "2026-10-26",
  "source": "USD",
  "target": "MAD",
  "rate": 9.8199,
  "rate_type": "reference",
  "derived": false,
  "method": "published",
  "age_days": 1,
  "stale": false,
  "cadence": "daily",
  "disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
}

Or the bank's full published table:

curl "https://allratestoday.com/api/v1/central-bank/bam/latest" \
  -H "Authorization: Bearer art_live_your_key"

The full-table response has the same envelope with every published row (first rows shown):

{
  "bank": "bam",
  "name": "Bank Al-Maghrib",
  "rate_date": "2026-10-26",
  "age_days": 1,
  "stale": false,
  "cadence": "daily",
  "rates": [
    {"base":"AED","quote":"MAD","type":"reference","value":2.6735},
    {"base":"AUD","quote":"MAD","type":"reference","value":6.9056},
    {"base":"BHD","quote":"MAD","type":"reference","value":26.034},
    {"base":"BRL","quote":"MAD","type":"reference","value":1.9646},
    … 26 more rows
  ],
  "disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
}

On paid plans, any historical date or a time series:

curl "https://allratestoday.com/api/v1/central-bank/bam/history?source=USD&target=MAD&from=2025-01-01" \
  -H "Authorization: Bearer art_live_your_key"

Latest published rates (2026-10-26)

The most recent table as published by Bank Al-Maghrib — exactly what the /latest endpoint returns right now. Values are MAD per 1 unit of each currency:

Download this table: Excel (.xlsx) CSV

Download history:
Choose currencies: USD
Excel (.xlsx) CSV

One row per currency per publication date. Up to one year per download. Billed as one API call per currency per month of data.

BaseQuoteTypeRate
AED MAD reference 2.6735
AUD MAD reference 6.9056
BHD MAD reference 26.034
BRL MAD reference 1.9646
CAD MAD reference 7.0065
CHF MAD reference 11.893
CNY MAD reference 1.4724
DKK MAD reference 1.4725
DZD MAD reference 0.07284
EGP MAD reference 0.1753
EUR MAD reference 11.0062
GBP MAD reference 13.11
GIP MAD reference 13.11
INR MAD reference 0.1031
JOD MAD reference 13.85
JPY MAD reference 0.062441
KWD MAD reference 31.6
LYD MAD reference 1.5314
MRU MAD reference 0.2447
NOK MAD reference 1.0514000000000001
OMR MAD reference 25.505
QAR MAD reference 2.6939
RUB MAD reference 0.1217
SAR MAD reference 2.6165
SEK MAD reference 0.98827
TND MAD reference 3.289
TRY MAD reference 0.1973
USD MAD reference 9.8199
XOF MAD reference 0.016779
ZAR MAD reference 0.5919

Node.js / TypeScript client

A dedicated zero-dependency npm package wraps these endpoints — bank-al-maghrib-exchange-rate:

npm install bank-al-maghrib-exchange-rate
import { getRate } from 'bank-al-maghrib-exchange-rate';

const pair = await getRate('USD', 'MAD', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date);

Zero dependencies, TypeScript types included, and it runs anywhere fetch exists — Node 18+, Bun, Deno, and edge runtimes.

Full reference — installation, all four functions, response shapes, error codes: bank-al-maghrib-exchange-rate documentation.

Why use the official Bank Al-Maghrib rate?

Live market rates move continuously, but tax filings, customs declarations, audits, and statutory accounting in Morocco and beyond typically require the official rate published by Bank Al-Maghrib for a given date — a fixed, citable number that never changes after publication. This API serves those published tables with the bank's own rate_date on every response; weekends and holidays return the most recent published date, which is the rate compliance rules require you to apply.

Pairs the bank doesn't print directly are resolved from its table (inverse or cross via MAD) and explicitly flagged "derived": true — so what the bank printed and what was computed are never confused.

Endpoints

Full parameter reference in the API documentation. Every request counts toward your plan's monthly quota — rates change once per business day, so caching a published table locally makes a small quota go far.

Frequently asked questions

Can I get Bank Al-Maghrib exchange rates via an API?

Yes — this API serves the bank's official daily MAD rates as JSON, and the latest table is on every plan, free included.

When do new rates appear here?

Once per business day, per Bank Al-Maghrib's own schedule; ingestion follows within the hour (latest table: 2026-10-26).

Are these the official rates?

Yes — ingested from Bank Al-Maghrib's own published data, served unmodified with the bank's publication date. Anything computed rather than published is flagged derived.

Bank Al-Maghrib rates, one API key

Latest table on every plan. History back to 2000 on paid plans. No credit card to start.

Get Free API Key Read the Docs