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 andtime is empty.
GET https://nerkh.jahankhahan.shop/data/live.json
| Field | Meaning |
|---|---|
| date | Jalali date of the rate, e.g. 1405/07/13 |
| time | Time of the last change, Tehran time |
| rates.dollar | US dollar (currently 268,700 toman) |
| rates.euro / yuan | Euro and Chinese yuan |
| rates.gold / coin | One gram of 18k gold, and the Emami gold coin |
| rates.aed / lira / pound | UAE dirham, Turkish lira and British pound |
| rates.tether / bitcoin | Tether and Bitcoin in toman |
| rates.gold24 / bahar / half / quarter / gram | 24k gold per gram, Bahar Azadi coin, half coin, quarter coin and one-gram coin |
| ounce | World 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].
| Key | Series | Available from (Jalali) |
|---|---|---|
| dollar | US dollar | 1390/09/05 |
| euro | Euro | 1391/04/08 |
| yuan | Chinese yuan | 1393/04/30 |
| gold | 18k gold, per gram | 1392/04/31 |
| coin | Emami gold coin | 1389/01/15 |
| aed | UAE dirham | 1391/06/11 |
| lira | Turkish lira | 1393/04/30 |
| pound | British pound | 1391/06/11 |
| tether | Tether (USDT) | 1399/08/22 |
| bitcoin | Bitcoin | 1399/08/22 |
| gold24 | 24k gold, per gram | 1393/02/12 |
| bahar | Bahar Azadi gold coin | 1392/04/31 |
| half | Half coin | 1392/04/31 |
| quarter | Quarter coin | 1392/04/31 |
| gram | One-gram coin | 1392/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
| Parameter | Meaning |
|---|---|
| price | Purchase price in toman (required) |
| date | Purchase date, Jalali, e.g. 1404/07/15 (required) |
| margin | Profit margin in percent; if omitted, sell prices for 10, 20 and 30 percent are returned |
| adj | Market adjustment in percent for that item; may be negative |
| series | dollar (default) or any other key from the archive table, e.g. aed or lira |
| format | json 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.