EZRate
Sign in

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.

Ersan Fazli
· Web Developer
Published 19 October 2026, 20:00 · 4 min read
Iranian Rial Exchange Rate API: The Complete Guide to IRR and Toman Rates
Key takeaways
  • 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.

★
Short answer
Use a data source that publishes the Tehran free-market rate, not only the official rate. Store and display the unit explicitly (Toman = 10 Rial). Call the API from your server, cache responses for the freshness window of your plan, and show the update time and source count next to every rate. EZRate’s REST API does all of this: 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.

Diagram of Iran’s exchange-rate landscape: official mechanism, Tehran free market, border hubs and USDT
The rates that coexist in Iran’s currency market

What the API gives you

EndpointUse it for
GET /assetsList of symbols, categories and the markets each asset trades in
GET /rates?symbols=usd,eur,g18Live 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=1dOHLC candles for charts and research
GET /convert?from=usd&to=eur&amount=100Convert an amount between any two assets or IRT/IRR
GET /cross?base=usd&symbols=eur,aed,tryCross rates derived from Tehran prices
GET /markets/{symbol}Compare one asset across markets with the % gap to Tehran
GET /usageYour 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.

bash
curl -s -H "X-API-Key: $EZRATE_KEY" \
  "https://api.ezrate.me/v1/rates?symbols=usd,eur,aed,g18,emami,usdt&lang=en"
json
{
  "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

GroupExamplesDeep dive
FiatUSD, EUR, AED, TRY, GBP, CNY, IQDEUR, TRY and IRR feeds
Gold18k gram (g18), 24k, mesghal, ounceIran gold price API
CoinsEmami, Bahar Azadi, half, quarter, gram coinIranian gold coins explained
CryptoUSDT, BTC and major coinsUSDT to IRT API
Regional marketsUSD in Herat, Sulaymaniyah, Dubai, IstanbulIran’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

  1. Server-side only. Never put your key in browser JavaScript or a mobile binary: securing financial API keys.
  2. Cache for at least meta.freshness_sec. One cached response can serve every visitor: Laravel caching shows the pattern.
  3. Handle errors and staleness. Respect 429 and Retry-After, keep the last good value, show updated_at: failover strategies.
  4. Display honestly. Show buy/sell, the unit, the update time and a low-source badge when needed.
Architecture diagram: EZRate API → your backend with cache → web, mobile and bot clients
Recommended integration architecture

Tutorials by stack

StackTutorial
Python / DjangoUSD to IRR in Python & Django
PHP / LaravelLaravel exchange rate API with caching
ReactReact Toman currency converter
Node.jsWebSocket vs REST polling in Node.js
Flutter / React NativeCross-platform FX tracker
Google Sheets / ExcelLive rates in spreadsheets
WooCommerceLive Toman rates in WooCommerce
TelegramTelegram 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.

US Dollar263,170Toman+0.37%

Related live rates: US dollar rate, 18K gold price, Emami coin price.

Is there an API for the free-market USD to IRR rate?
Yes. EZRate publishes the Tehran free-market buy and sell rate, aggregated from many sources every minute, via a REST API.
Why do global FX APIs show a different IRR rate?
Most of them publish an official rate, which is used only for specific transactions and is usually far below the free-market rate.
Are prices in Rial or Toman?
Toman by default. Pass quote=IRR to get Rial. The unit is always included in the response.
Is there a WebSocket stream?
No. The API is REST; data refreshes every minute, so polling with caching is efficient and simpler.
Can I get gold and coin prices too?
Yes: 18k and 24k gold per gram, mesghal, ounce and all Iranian gold coins, plus USDT and major cryptocurrencies.
Ersan Fazli
I work in software development and programming, with a strong interest in building practical and efficient solutions. My focus is on developing new features, improving system performance, and solving technical challenges using modern technologies. I strive to create reliable, scalable, and high-quality software through continuous learning and the application of modern development practices.
All posts by author →

Comments (0)

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

Related

Gold & coins
What Is the Gold Bubble in Iran? Real Value vs. Market Price
Gold & coins
What Is a Gold Coin Bubble and How Is It Calculated?
Gold & coins
How Is the Gold Price Calculated? From the Ounce to 18K Gold