@somnia-chain/markets-sdk / index / markOutcomePosition
Function: markOutcomePosition()
markOutcomePosition(
input):OutcomePositionMark
Defined in: packages/sdk/src/derivedReads.ts:912
Mark an outcome position: value = balance × mark, upnl = balance × (mark − avgEntry). When avgEntry is unknown (no buys indexed yet) only
value is computed and the PnL fields stay null — a dash beats an
invented zero basis.
Parameters
input
balance
bigint
Outcome-token balance held (raw units).
markPrice
bigint
Live mark price in the outcome's own terms (raw).
avgEntry
bigint | null
Average entry price in the outcome's own terms (raw), or null.
oneShare
bigint