@somnia-chain/markets-sdk / index / toHuman
Function: toHuman()
toHuman(
raw,decimals?):number
Defined in: units.ts:15
Raw integer (string or bigint) → human number for DISPLAY ONLY. Lossy past
~15 significant digits (it's an IEEE double) — never round-trip money through
this; use it for labels/charts. decimals defaults to the demo's 6 (tUSDC),
but pass the market's real quoteDecimals/baseDecimals when you have them.
Parameters
raw
string | bigint
decimals?
number = DECIMALS
Returns
number