How multi-currency pricing works under the hood
Ask for BTC in USDT and you get the market's own quote. Ask for BTC in TMN, AED or EUR and you get something the market never traded — a converted price. Doing that conversion well is harder than multiplying by a rate, and doing it client-side is a mistake we designed the API to spare you.
Why server-side
If every client converts independently, three problems appear at once. First, rate skew: two of your users fetch FX rates seconds apart and see different TMN prices for the same tick. Second, rounding drift: a price that round-trips through float multiplication in JavaScript won't equal the same conversion done in your backend report. Third, candle incoherence: if you convert each OHLC field of a candle with whichever rate is current now, a candle from last week gets priced with today's rate.
CryHub converts at the source instead. When you subscribe with quote=tmn, every field of every tick — price, high, low, open, close, volume_quote, each depth level, each trade — is converted before it leaves our infrastructure. All consumers see the same number at the same moment.
The pipeline
The conversion layer sits between the exchange feeds and the fan-out:
- Reference rates for USDT→TMN, USDT→AED and USDT→EUR are maintained continuously and refreshed on a seconds cadence, with outlier rejection so a bad print on a thin venue doesn't spike every price on the platform.
- Historical queries use historical rates. A daily candle from March is converted with March's rate, not today's — so a TMN chart of last quarter reflects what the market actually looked like in TMN last quarter, including the currency's own moves.
- Rounding is per-currency. TMN prices carry no decimals — a BTC price is billions of rial, and
3,900,356,720.41is noise pretending to be precision. EUR and AED keep conventional decimal places; tick-size-aware rounding keeps order-book levels from colliding after conversion.
What this means for your code
The practical consequence is that quote is just a parameter. The tick shape is identical in every currency, your formatting layer needs one symbol lookup, and switching a whole dashboard from USDT to TMN is a resubscribe — not a conversion module. The quote toggle in our own demo terminal is implemented exactly that way: it changes one string and lets the server do the rest.
One honest caveat: converted prices are derived data. For display, analytics and portfolio valuation they're what you want. If you're settling trades, settle in the instrument's native quote and treat conversions as reporting.