@somnia-chain/markets-sdk / index / markYesPrice
Function: markYesPrice()
markYesPrice(
top,lastPrice):bigint|null
Defined in: packages/sdk/src/units.ts:152
Mark-to-market YES price (raw): the book mid when two-sided, otherwise the
last trade clamped into the surviving side's bound. The clamp reconciles the
two failure modes of a one-sided book: marking to the lone quote outright
flashes the full bid-ask spread as a loss right after a taker clears the top
of the book, while marking to the last trade alone freezes the mark at a
stale print when the market genuinely runs away — a resting quote BEYOND the
last print is live, executable information and supersedes it. With no last
trade the lone side is all there is; null only when the book is empty and
nothing has traded.
Parameters
top
lastPrice
string | bigint | null | undefined
Returns
bigint | null