@somnia-chain/markets-sdk / index / UnifiedBalance
Interface: UnifiedBalance
Defined in: packages/sdk/src/unified/structs.ts:213
One currency's balance, human units (ccxt shape). For spot/binary, funds
escrowed in resting orders live in the pools — not the wallet — so used
is 0 and free === total. NOTE: this "used is 0" property is a fact about
wallet-held tokens, not a law of the venue — perp collateral IS locked
(MarginBank margin against open positions), and a margin-aware
fetchBalance arm must report it through used rather than pretending
the invariant generalizes.
Properties
free
free:
number
Defined in: packages/sdk/src/unified/structs.ts:215
Spendable balance.
used
used:
number
Defined in: packages/sdk/src/unified/structs.ts:217
Locked balance (0 for wallet-held spot/binary tokens; perp margin when reported).
total
total:
number
Defined in: packages/sdk/src/unified/structs.ts:219
free + used, human units.