Free-market prices in Iran for the US dollar, euro, pound, gold and coins, taken from tgju.org every 30 minutes during market hours and served as a free API: no key, no sign-up, CORS enabled.
- Website: priceto.day. Prices, charts and changes in Persian or English.
- API: api.priceto.day has an introduction with examples. Full documentation is on prices.readme.io, and the spec is in
openapi.yaml. - Also: a Telegram bot, an MCP server for Claude, and the full history as a monthly CSV dataset.
For example, the latest price of USD in IRR:
curl https://api.priceto.day/v1/latest/irr/usdOr in PowerShell:
$(Invoke-WebRequest 'https://api.priceto.day/v1/latest/irr/usd').ContentThe list of symbols is at https://api.priceto.day/v1/symbols.
/v1/health: when prices were last updated. Returns 503 when the updates have stalled./v1/version: the deployed version and git commit./v1/stats: API requests and distinct users per day. IPs are kept only as a daily-salted hash and deleted the next day.
Prices don't change on Fridays or after Thursday afternoon, when Iran's market is closed.
@Price2DayBot on Telegram sends a daily report after the evening update and lets anyone set price alerts:
/price usd— latest price/alert usd > 280000— message me when the dollar goes above 280,000 Toman (<for below)/alerts,/unalert 3— list and remove alerts
Ask Claude (or any MCP client) about prices directly. The server at https://api.priceto.day/mcp (Streamable HTTP, no authentication) offers the tools list_symbols, get_latest_price, get_price_history, get_price_change and convert.
- Claude Code:
claude mcp add --transport http pricedb https://api.priceto.day/mcp - Claude (web/desktop): Settings → Connectors → Add custom connector →
https://api.priceto.day/mcp
The full price history of all 29 tracked symbols (daily since 2023-12, plus every 30-minute update) is published as CSV on the 1st of each month: see the dataset-* releases. The current data can also be downloaded any time from https://api.priceto.day/v1/dataset/daily.csv and .../hourly.csv.
Prices come from tgju.org. The dollar is cross-checked against USDT on the Bitpin exchange every 30 minutes (an alert fires when they differ by more than 5%), and either can be requested: /v1/latest/irr/usd?source=bitpin or ?source=average.
- History as CSV:
https://api.priceto.day/v1/history/irr/usd?from=2025-01-01&format=csv - Daily prices as an RSS feed:
https://api.priceto.day/v1/feed.xml
Embed live prices in a README or web page. Optional query parameters: label, rounding (divide by 10^n), precision, unit and color (a name such as green or a hex code).
- USD to 1k Toman Chart
- GBP to 1k Toman Chart
- EUR to 1k Toman Chart
- Gold Miskal to 1m Tomans Chart
- Sekke Emami to 1m Tomans Chart
- Sekke Bahar Azadi to 1m Tomans Chart
- Sekke Bahar Azadi to USD
- Sekke Bahar Azadi to GBP
- Sekke Bahar Azadi to EUR
- Nim Sekke Bahar Azadi to 1m Tomans Chart
- Rob Sekke Bahar Azadi to 1m Tomans Chart
- Sekke 1 Grami to 1m Tomans Chart
Any symbol can be priced in another one (e.g. a coin in USD, or USD in gold), and charts can cover any range. Add format=svg for a vector image.
The API and the website run on Cloudflare Workers, with prices stored in D1. A Cron Trigger fetches new prices every 30 minutes during market hours.
GitHub Actions deploys the Worker. A push to sandbox deploys the sandbox at pricedb-sandbox.whosane.workers.dev, and a merge into main deploys production.
You can run your own copy with a Cloudflare account; the Workers Free plan is enough for a small instance.
git clone https://github.com/margani/pricedb && cd pricedb
npm install
npx wrangler login
# Deploy the Worker. The D1 database is created on the first deploy.
cd worker && npx wrangler deploy && cd ..
# Create the tables and load the full price history from the latest public dataset
(cd worker && npx wrangler d1 migrations apply DB --remote)
node scripts/import-dataset.mjsYour API is then available at https://pricedb-api.<your-subdomain>.workers.dev/v1/... and keeps itself up to date. Optional alerts: set the TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID secrets (npx wrangler secret put ...) to get a Telegram message when updates fail.
For local development, npx wrangler d1 migrations apply DB --local, node scripts/import-dataset.mjs --local and npx wrangler dev (in worker/). Run the tests with npm test.