@somnia-chain/markets-sdk / index / MarginAccount
Interface: MarginAccount
Defined in: reads.ts:217
An account's cross-margin state in the MarginBank (collateral is the bank's single collateral token, e.g. USDso — raw units).
Properties
unlockedCollateralBalance
unlockedCollateralBalance:
bigint
Defined in: reads.ts:219
Free collateral after locks (signed — settlement can drive it negative).
lockedCollateral
lockedCollateral:
bigint
Defined in: reads.ts:221
Collateral reserved for pending orders.
activePerpPools
activePerpPools:
`0x${string}`[]
Defined in: reads.ts:223
Perp pools where the account holds an open position.
equity
equity:
bigint
Defined in: reads.ts:225
Equity = collateral + unrealized PnL − pending funding (signed).
withdrawable
withdrawable:
bigint
Defined in: reads.ts:227
Collateral withdrawable right now (respects margin requirements).
imReq
imReq:
bigint
Defined in: reads.ts:229
Sum of notional × initialMarginBps / 10000 across all markets (raw).
mmReq
mmReq:
bigint
Defined in: reads.ts:231
Sum of notional × maintenanceMarginBps / 10000 across all markets (raw).
cmReq
cmReq:
bigint
Defined in: reads.ts:233
Sum of notional × closeOutMarginBps / 10000 across all markets (raw).
marginStatus
marginStatus:
MarginStatus
Defined in: reads.ts:235
Health bucket derived from equity vs the requirements.