{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: BinaryOrderQuote

Defined in: derivedReads.ts:23

The result of quoting a market order against the live book — the "you'll pay ~$X, average Y, slippage Z" preview. All prices/amounts are RAW units in the OUTCOME's own terms (a BUY_NO quote is priced in NO terms).

Properties

avgPrice

avgPrice: bigint

Defined in: derivedReads.ts:26

Volume-weighted average fill price (raw units per whole outcome token), in the quoted outcome's terms. 0n if nothing fills.


cost

cost: bigint

Defined in: derivedReads.ts:29

Total cost for a BUY (raw collateral paid) / total proceeds for a SELL (raw collateral received) = Σ(levelQty × levelPrice) / oneCollateral.


filledQuantity

filledQuantity: bigint

Defined in: derivedReads.ts:32

How much of quantity actually crosses the resting book (raw outcome units). Less than quantity when the book is too thin to fill it all.


wouldRest

wouldRest: bigint

Defined in: derivedReads.ts:35

The unfilled remainder that would rest as a maker order (raw outcome units) — quantity − filledQuantity.


levelsConsumed

levelsConsumed: number

Defined in: derivedReads.ts:37

Number of price levels the order consumed (partially or fully).


slippageVsMid

slippageVsMid: bigint

Defined in: derivedReads.ts:41

Signed slippage of avgPrice vs the book mid, in raw price units (avgPrice − mid for a buy; mid − avgPrice for a sell — positive = worse than mid). 0n if the book has no mid (a side is empty) or nothing fills.