Iranian Rial Exchange Rate API: The Complete Guide to IRR and Toman Rates
A complete guide to the Iranian Rial exchange rate API: free-market vs official rates, Rial vs Toman, endpoints, JSON fields, history, caching and security.

- Most global FX APIs publish Iran’s official rate, which can be far from the free-market price that people and businesses in Iran actually pay.
- EZRate aggregates live Tehran free-market quotes every minute, removes outliers and publishes buy/sell rates for USD, EUR, AED, TRY, gold, coins and USDT in Toman or Rial.
- This pillar covers the concepts and the architecture; each section links to a step-by-step tutorial.
If you have ever pulled “USD/IRR” from a mainstream currency API and shown it to users in Iran, you probably got a complaint within minutes: the number did not match anything they saw in the market. Iran has several exchange rates at the same time, two currency units in daily use and a market without a central exchange. This guide explains what an Iranian Rial exchange rate API has to deal with, and how to integrate one correctly.
https://api.ezrate.me/v1, authenticated with an X-API-Key header.Why Iranian exchange rates are different
Several rates at once
Iran runs official mechanisms for certain imports and exports alongside a free market where individuals and most businesses trade. The official rate is usually well below the free-market rate. Global providers often source the official figure, which is why it looks “wrong” to people in Iran. The full explanation is in Iran official vs free market rate.
No central order book
The free market is spread across exchange offices, wholesale traders, trading groups, border markets and crypto exchanges. There is no single ticker to read. A reliable rate has to be built from many concurrent quotes, which is what EZRate’s pipeline does: how EZRate aggregates OTC market data.
Rial and Toman
The Rial (IRR) is the legal unit; the Toman (10 Rial) is what people say and what most prices are quoted in. Mixing them up is the most common fintech bug in Iran. See IRR vs Toman for developers.

What the API gives you
| Endpoint | Use it for |
|---|---|
GET /assets | List of symbols, categories and the markets each asset trades in |
GET /rates?symbols=usd,eur,g18 | Live buy/sell prices for several assets in one call |
GET /rates/{symbol} | One asset, with its price in every market (Tehran, Herat, Dubai…) |
GET /history/{symbol}?interval=1d | OHLC candles for charts and research |
GET /convert?from=usd&to=eur&amount=100 | Convert an amount between any two assets or IRT/IRR |
GET /cross?base=usd&symbols=eur,aed,try | Cross rates derived from Tehran prices |
GET /markets/{symbol} | Compare one asset across markets with the % gap to Tehran |
GET /usage | Your daily and monthly usage (does not count against quota) |
Every response has a data object and a meta object with as_of, freshness_sec and quote. The full schema of each endpoint is in the JSON reference, and you can make your first request in five minutes with the quickstart.
curl -s -H "X-API-Key: $EZRATE_KEY" \
"https://api.ezrate.me/v1/rates?symbols=usd,eur,aed,g18,emami,usdt&lang=en"{
"data": [
{ "symbol": "usd", "code": "USD", "name": "US Dollar", "category": "fiat",
"market": "tehran", "buy": 0, "sell": 0, "change_pct": 0.12,
"sources": 13, "low_sources": false, "updated_at": "…", "quote": "IRT" }
],
"meta": { "as_of": "…", "freshness_sec": 60, "quote": "IRT" }
}How the numbers are built
Every minute EZRate collects quotes from many independent sources, keeps only the recent ones, drops anything more than about 1% away from the median and publishes a weighted median of what remains. When fewer than five valid sources are active (late at night, on holidays), the last good rate is kept and flagged with low_sources: true. A jump guard stops sudden unconfirmed spikes. The method is public on the methodology page, and the statistics behind it are covered in outlier detection in price feeds.
Assets you can query
| Group | Examples | Deep dive |
|---|---|---|
| Fiat | USD, EUR, AED, TRY, GBP, CNY, IQD | EUR, TRY and IRR feeds |
| Gold | 18k gram (g18), 24k, mesghal, ounce | Iran gold price API |
| Coins | Emami, Bahar Azadi, half, quarter, gram coin | Iranian gold coins explained |
| Crypto | USDT, BTC and major coins | USDT to IRT API |
| Regional markets | USD in Herat, Sulaymaniyah, Dubai, Istanbul | Iran’s regional FX hubs |
Choosing the unit: `quote`
By default prices are in Toman (IRT). Pass quote=IRR for Rial, or any asset symbol to price everything in that asset, e.g. quote=usd returns gold in free-market dollars and quote=usdt prices crypto in Tether. Never multiply by ten in your own code if the API can do it; the unit is then recorded in the response and your logs.
Integration architecture
- Server-side only. Never put your key in browser JavaScript or a mobile binary: securing financial API keys.
- Cache for at least
meta.freshness_sec. One cached response can serve every visitor: Laravel caching shows the pattern. - Handle errors and staleness. Respect
429andRetry-After, keep the last good value, showupdated_at: failover strategies. - Display honestly. Show buy/sell, the unit, the update time and a low-source badge when needed.

Tutorials by stack
| Stack | Tutorial |
|---|---|
| Python / Django | USD to IRR in Python & Django |
| PHP / Laravel | Laravel exchange rate API with caching |
| React | React Toman currency converter |
| Node.js | WebSocket vs REST polling in Node.js |
| Flutter / React Native | Cross-platform FX tracker |
| Google Sheets / Excel | Live rates in spreadsheets |
| WooCommerce | Live Toman rates in WooCommerce |
| Telegram | Telegram FX broadcast bot |
Historical data
/history/{symbol} returns hourly or daily candles (t, o, h, l, c, UTC timestamps, based on the sell rate). Depth depends on your plan. For research use cases see historical USD/IRR data.
Plans and limits
Plans differ by request quota, data freshness and history depth. Limits are returned in X-RateLimit-* headers and in /usage. Current plans are listed on the API page.
Related live rates: US dollar rate, 18K gold price, Emami coin price.

Comments (0)
Comments are shown after review. Sign-in is needed to send.


