@somnia-chain/markets-sdk / index / UnifiedPosition
Interface: UnifiedPosition
Defined in: unified/structs.ts:197
An open perp position, human units.
Properties
symbol
symbol:
string
Defined in: unified/structs.ts:199
The perp's tradable symbol.
side
side:
"long"|"short"
Defined in: unified/structs.ts:201
Position direction (from the sign of the on-chain size).
contracts
contracts:
number
Defined in: unified/structs.ts:203
Absolute position size in base units.
entryPrice
entryPrice:
number
Defined in: unified/structs.ts:205
Average entry price, human quote units.
markPrice?
optionalmarkPrice?:number
Defined in: unified/structs.ts:207
Current EMA mark price, human quote units.
unrealizedPnl?
optionalunrealizedPnl?:number
Defined in: unified/structs.ts:209
(mark − entry) × signed size, human quote units. Excludes pending funding.
liquidationPrice?
optionalliquidationPrice?:number
Defined in: unified/structs.ts:214
Estimated liquidation price, human quote units (conservative single-pool maintenance estimate); undefined when it can't be derived.
timestamp?
optionaltimestamp?:number
Defined in: unified/structs.ts:216
When the position last changed on-chain (ms).
datetime?
optionaldatetime?:string
Defined in: unified/structs.ts:218
ISO-8601 of timestamp.
info
info:
unknown
Defined in: unified/structs.ts:220
The native reads: { position, state } (raw bigints).