@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / BinaryPnl

Interface: BinaryPnl

Defined in: packages/sdk/src/units.ts:277

Realized + unrealized PnL for one account in one binary market, computed purely from its fills + current outcome balances + the market row. Returns HUMAN numbers (quote/collateral units), keyed per outcome (YES/NO) plus a combined total — display-grade, like toHuman.

Properties

yes

yes: BinaryOutcomePnl

Defined in: packages/sdk/src/units.ts:279

PnL attributable to the YES outcome (human quote units).


no

no: BinaryOutcomePnl

Defined in: packages/sdk/src/units.ts:281

PnL attributable to the NO outcome (human quote units).


realized

realized: number

Defined in: packages/sdk/src/units.ts:283

yes.realized + no.realized.


unrealized

unrealized: number | null

Defined in: packages/sdk/src/units.ts:285

yes.unrealized + no.unrealized; null when the market has no price to mark against.


total

total: number | null

Defined in: packages/sdk/src/units.ts:287

realized + unrealized; null when the market has no price to mark against.