Moroccan Dirham (MAD)
The Moroccan Dirham is the official currency of Morocco.
Currency Details
| Currency Code | MAD |
| Symbol | MAD |
| Minor Unit | Centime (1/100) |
| Countries | Morocco, Western Sahara |
| Central Bank | Bank Al-Maghrib |
Official MAD Central Bank Rates
Live rates on this page are mid-market rates. For tax filings, customs valuations, audits, and compliant invoicing you often need the official reference rate published by Bank Al-Maghrib instead. AllRatesToday serves Bank Al-Maghrib published rates as JSON, with history and a free latest-rates tier.
Popular MAD Conversions
Live MAD Exchange Rates
Coins & Banknotes
🪙 Coins
💵 Banknotes
Frequently Asked Questions
MAD Exchange Rate API
Get live Moroccan Dirham (MAD) exchange rates in your app, spreadsheet or backend with one HTTPS request. The AllRatesToday API returns MAD mid-market rates against 160+ currencies as JSON, converts amounts, serves past dates and date ranges, and also returns the official rate published by Bank Al-Maghrib.
Endpoints for MAD
| What you need | Request |
|---|---|
| Latest MAD/USD rate | GET /api/v1/rates?source=MAD&target=USD |
| MAD against several currencies | GET /api/v1/rates?source=MAD&target=USD,EUR,GBP |
| Convert an amount from MAD | GET /api/v1/rates?source=MAD&target=USD&amount=1000 |
| MAD rate on a past date | GET /api/v1/rates?source=MAD&target=USD&time=2026-06-30 |
| MAD rate history for a date range | GET /api/v1/rates?source=MAD&target=USD&from=2026-01-01&to=2026-06-30 |
| MAD rates as CSV, XML or Excel | GET /api/v1/rates?source=MAD&target=USD,EUR,GBP&format=csv |
| Official Bank Al-Maghrib rate | GET /api/v1/central-bank/bam/latest |
Send your key as Authorization: Bearer YOUR_API_KEY.
Example request
cURL
curl "https://allratestoday.com/api/v1/rates?source=MAD&target=USD" \
-H "Authorization: Bearer YOUR_API_KEY"JavaScript (npm install @allratestoday/sdk)
import AllRatesToday from '@allratestoday/sdk';
const client = new AllRatesToday('YOUR_API_KEY');
const rate = await client.getRate('MAD', 'USD');
console.log(rate);Python (pip install allratestoday)
from allratestoday import AllRatesToday
client = AllRatesToday(api_key="YOUR_API_KEY")
rate = client.get_rate("MAD", "USD")
print(rate)Example response
[
{
"rate": 0.0000,
"source": "MAD",
"target": "USD",
"time": "2026-11-01T12:00:00Z"
}
]The rate value above is filled in from the live MAD/USD rate when the page loads.
What developers build with MAD rates
- Prices in MAD: show product prices, subscriptions or quotes in Moroccan Dirham for visitors in Morocco.
- Checkout and invoicing: convert order totals to or from MAD at the current rate and store the rate used.
- Accounting and reporting: pull daily MAD rates for month-end revaluation, using the official Bank Al-Maghrib rate where the rules require it.
- Dashboards and spreadsheets: download MAD history as CSV or Excel, or sync rates into an ERP with the accounting integrations.
- AI agents: give an assistant live MAD rates through the hosted MCP server.
Browse Other Currencies
Packages and open data
- JavaScript: @allratestoday/sdk on npm — live MAD rates, conversion and official central-bank tables.
- Python: allratestoday on PyPI · PHP: allratestoday/sdk on Packagist · Go: allratestoday-go · Rust: allratestoday on crates.io.
- Bank Al-Maghrib rates for MAD: bank-al-maghrib-exchange-rate on npm · source on GitHub · docs.
- Open dataset of official central-bank rates, refreshed daily: Hugging Face · Kaggle · GitHub (JSON and CSV).
- AI agents: hosted MCP server, @allratestoday/mcp-server on npm and the OpenClaw skill.
- WordPress: currency converter plugin on WordPress.org.
- All code: AllRates-Today on GitHub · SDK docs.