{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: BinaryPnl

Defined in: units.ts:70

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: object

Defined in: units.ts:72

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

realized

realized: number

Realized on YES sells: proceeds − avg cost of the tokens sold.

unrealized

unrealized: number

The remaining YES balance marked to lastPrice / settlement, minus its avg cost.


no

no: object

Defined in: units.ts:79

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

realized

realized: number

Realized on NO sells: proceeds − avg cost of the tokens sold.

unrealized

unrealized: number

The remaining NO balance marked to lastPrice / settlement, minus its avg cost.


realized

realized: number

Defined in: units.ts:86

yes.realized + no.realized.


unrealized

unrealized: number

Defined in: units.ts:88

yes.unrealized + no.unrealized.


total

total: number

Defined in: units.ts:90

realized + unrealized.