@somnia-chain/markets-sdk


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

Type Alias: BookTop

BookTop = object

Defined in: packages/sdk/src/orders.ts:415

Top of one market's resting book — ANY market kind.

Prices are RAW and in that market's own terms: quote units per whole base on SPOT and PERP, YES probability on BINARY (there, the same scale as BinaryMarket.lastPrice). Comparable within a market, never across kinds or against another market's quote asset.

mid is (bestBid + bestAsk) / 2, null unless BOTH sides rest — a one-sided book has no meaningful mid.

Properties

bestBid

bestBid: string | null

Defined in: packages/sdk/src/orders.ts:417

Best (highest) resting bid price (raw); null when no bid rests.


bestAsk

bestAsk: string | null

Defined in: packages/sdk/src/orders.ts:419

Best (lowest) resting ask price (raw); null when no ask rests.


mid

mid: string | null

Defined in: packages/sdk/src/orders.ts:421

(bestBid + bestAsk) / 2, floored (raw); null unless BOTH sides rest.