Central Bank of Iran Exchange Rate API: Official IRR (Rial) Reference Rates as JSON

Reviewed by Madhushan, Fintech Developer — September 2026

The Central Bank of Iran publishes the official exchange rates that accounting, tax, and customs rules in Iran reference — published official rates, not moving market prices. This guide shows how to pull them as JSON: via a REST endpoint or the zero-dependency central-bank-of-iran-exchange-rate npm package.

What the CBI publishes

Iran has run several exchange rates at once for most of the past two decades, and the question that matters for an invoice or a customs entry is which one the central bank printed on a given day. The API serves that table, dated, for every currency the bank lists — with per-100 and per-1,000 units (Pakistani rupees, Japanese yen, Korean won) already normalised to one unit.

Why official rates, not market rates

A live mid-market feed answers "what is USD/IRR trading at right now?" — the right tool for checkouts and dashboards. But accountants, auditors, and tax authorities ask a different question: "which rate were you required to use for this date?" That answer comes from the Central Bank of Iran's published rates, and it never changes after publication.

Get the latest rates (REST)

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

The response is the bank's most recent published data — every rate and the publication date. The latest rates are available on every plan, including the free tier (300 free requests, no credit card).

The npm SDK

npm install central-bank-of-iran-exchange-rate
import { getRate, getLatestRates } from 'central-bank-of-iran-exchange-rate';

// One pair at the official CBI rate
const pair = await getRate('USD', 'IRR', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date);

// The bank's full published table
const table = await getLatestRates({ apiKey: 'art_live_...' });
console.log(table.rate_date, table.rates.length);

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

Historical rates for an invoice date

import { getRatesForDate, getHistory } from 'central-bank-of-iran-exchange-rate';

// The official rates for an invoice date — non-publication days return
// the most recent published date, flagged via published_on_requested_date.
const day = await getRatesForDate('2026-10-15', { apiKey: 'art_live_...' });

// Time series for one pair
const series = await getHistory(
  { source: 'USD', target: 'IRR', from: '2026-10-01' },
  { apiKey: 'art_live_...' }
);

Historical dates and time series need a paid plan; the latest rates stay free.

Published vs derived pairs

If the CBI does not print a pair directly, the API resolves it from the bank's published rates — an inverse, or a cross rate via IRR — and flags it derived: true with the method used. Official and computed values are never silently mixed, which is exactly the distinction an auditor will ask about.

Reference rates since the 2002 unification

The archive starts on 25 March 2002, the first table after Iran unified its exchange rates, when the dollar stood at 7,924 rials. The series then records the bank's own prints through the 2012 and 2018 devaluations, the 42,000-rial rate held from 2018 to late 2024, and the market-tracking reference rate that followed — 466,507 rials per dollar in December 2024 and 1.83 million by October 2026. For any date in that range, one call returns the table in force that day; the bank publishes seven days a week, with Friday repeating Thursday's table.

FAQ

Does the Central Bank of Iran have an official exchange rate API?

The CBI publishes its official rates on its own site, and AllRatesToday serves the same published rates as clean JSON via REST or the central-bank-of-iran-exchange-rate npm package. The latest rates are free (300 free requests); historical dates need a paid plan.

How often do Central Bank of Iran rates update?

Every day, including Fridays and holidays, as one table of 47 currencies in rials per unit stamped in the Tehran morning. Every API response carries the table's own date; the Friday table repeats Thursday's rates, as the bank publishes it.

Can I get the CBI rate for a past date, like an invoice date?

Yes, for any date from 25 March 2002 onward. The /central-bank/cbir/rates-for-date endpoint returns the table the bank published that day; the archive is loaded from the bank's own date-by-date pages, so a past invoice date resolves to the rate that was in force.

Official Central Bank of Iran rates, as JSON

The latest rates are free — 300 free requests, no credit card.

Get your free API key

Related Articles