Nerkhsanj open data API

Nerkhsanj (نرخ‌سنج) publishes three open endpoints. They are free and need no API key or sign-up: live rates, a daily archive, and a replacement-cost calculator. All amounts are in Iranian toman (1 toman = 10 rial) and reflect the Tehran free market. Dates are in the Solar Hijri (Jalali) calendar. نسخهٔ فارسی

1. Live rates

Updated every minute. Outside market hours it holds the last trading day's closing rate and time is empty.

GET https://nerkh.jahankhahan.shop/data/live.json

FieldMeaning
dateJalali date of the rate, e.g. 1405/07/13
timeTime of the last change, Tehran time
rates.dollarUS dollar (currently 268,700 toman)
rates.euro / yuanEuro and Chinese yuan
rates.gold / coinOne gram of 18k gold, and the Emami gold coin
rates.aed / lira / poundUAE dirham, Turkish lira and British pound
rates.tether / bitcoinTether and Bitcoin in toman
rates.gold24 / bahar / half / quarter / gram24k gold per gram, Bahar Azadi coin, half coin, quarter coin and one-gram coin
ounceWorld gold price per troy ounce, in US dollars
change.*Percent change against the previous day

2. Daily archive

Closing rate of every trading day. Holidays have no row; use the last earlier trading day.

GET https://nerkh.jahankhahan.shop/data/rates.json

Shape: series[] with key, name and days; each item of days is a pair such as ["1404/07/15", 113970].

KeySeriesAvailable from (Jalali)
dollarUS dollar1390/09/05
euroEuro1391/04/08
yuanChinese yuan1393/04/30
gold18k gold, per gram1392/04/31
coinEmami gold coin1389/01/15
aedUAE dirham1391/06/11
liraTurkish lira1393/04/30
poundBritish pound1391/06/11
tetherTether (USDT)1399/08/22
bitcoinBitcoin1399/08/22
gold2424k gold, per gram1393/02/12
baharBahar Azadi gold coin1392/04/31
halfHalf coin1392/04/31
quarterQuarter coin1392/04/31
gramOne-gram coin1392/04/31

3. Replacement-cost calculator

What an item bought in the past costs today, scaled by the exchange rate. Returns a plain HTML page, or JSON with format=json.

GET https://nerkh.jahankhahan.shop/calc?price=830000&date=1404/07/15&margin=20&format=json

ParameterMeaning
pricePurchase price in toman (required)
datePurchase date, Jalali, e.g. 1404/07/15 (required)
marginProfit margin in percent; if omitted, sell prices for 10, 20 and 30 percent are returned
adjMarket adjustment in percent for that item; may be negative
seriesdollar (default) or any other key from the archive table, e.g. aed or lira
formatjson for data; omit it for a readable page

Response fields: rate_on_purchase_date, rate_now, ratio, replacement_cost and sell_prices. Formula: replacement_cost = price × (rate_now ÷ rate_on_purchase_date). The JSON response allows cross-origin requests.

4. Intraday rates and gold calculator

Today's low, high and ten-minute points for every series; and the intrinsic value and premium of gold and coins.

GET https://nerkh.jahankhahan.shop/data/intraday.json

Shape: series.dollar.low, high and points, each point a pair such as ["14:20", 268700]. The file restarts with every trading day.

GET https://nerkh.jahankhahan.shop/gold-calculator?format=json

Intrinsic value and premium ("bubble") of gold per gram and of each coin, derived from the world ounce price and the dollar rate. Add weight, karat, wage, profit and tax to price a piece of jewelry.

Terms of use

Free; please use it fairly.

Read each endpoint at most once a minute; rates do not change faster than that. To price many items, read live.json once and multiply yourself instead of calling /calc per item. When you show these numbers, credit "Nerkhsanj" as the source. The figures are exchange-rate-based estimates, not forecasts or financial advice. Ready-made examples for PHP, Python, JavaScript, WordPress and Google Sheets are in the Nerkhsanj GitHub repository.