@somnia-chain/markets-sdk / index / UnifiedPosition
Interface: UnifiedPosition
Defined in: packages/sdk/src/unified/structs.ts:339
An open perp position, human units.
Properties
symbol
symbol:
string
Defined in: packages/sdk/src/unified/structs.ts:341
The perp's tradable symbol.
side
side:
"long"|"short"
Defined in: packages/sdk/src/unified/structs.ts:343
Position direction (from the sign of the on-chain size).
contracts
contracts:
number
Defined in: packages/sdk/src/unified/structs.ts:345
Absolute position size in base units.
entryPrice
entryPrice:
number
Defined in: packages/sdk/src/unified/structs.ts:347
Average entry price, human quote units.
markPrice?
optionalmarkPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:349
Current EMA mark price, human quote units.
unrealizedPnl?
optionalunrealizedPnl?:number
Defined in: packages/sdk/src/unified/structs.ts:351
(mark − entry) × signed size, human quote units. Excludes pending funding.
liquidationPrice?
optionalliquidationPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:362
Estimated liquidation price, human quote units — the price at which THIS market's
move alone would trip the account's cross-margin maintenance requirement.
undefined when it can't be derived (a stale mark anywhere in the account reverts
the health read this needs).
Solved with both sides of equity == mmReq moving against the mark; see
perpLiquidationPrice for the identity and what is held constant. For the price a
proposed order would move this to, use client.previewPerpLiquidationPrice.
timestamp?
optionaltimestamp?:number
Defined in: packages/sdk/src/unified/structs.ts:364
When the position last changed on-chain (ms).
datetime?
optionaldatetime?:string
Defined in: packages/sdk/src/unified/structs.ts:366
ISO-8601 of timestamp.
info
info:
unknown
Defined in: packages/sdk/src/unified/structs.ts:368
The native reads: { position, state } (raw bigints).