@somnia-chain/markets-sdk / index / positionMarkState
Function: positionMarkState()
positionMarkState(
input):PositionMarkState
Defined in: packages/sdk/src/derivedReads.ts:959
Classify how a position marks from its market's status/resolution: a resolved market pays its winning outcome, a voided one refunds, a still-trading one marks live, and anything expired-but-unresolved is settling (marking to a stale book there flashes phantom PnL).
Parameters
input
status
string
BinaryMarketStatus string from the market row.
voided
boolean
winningOutcome
number | null | undefined
Winning outcome index (0 = YES, 1 = NO), or null until resolved.
outcomeIndex
number
expirySec
number
Market expiry (unix seconds).
nowSec
number
Reference "now" (unix seconds).