@somnia-chain/markets-sdk / react / useLiveBinaryOrderBook
Function: useLiveBinaryOrderBook()
useLiveBinaryOrderBook(
pool,depth?):BinaryOrderBook
Defined in: packages/sdk/src/hooks.ts:363
The locally-materialized resting book of a binary pool (4-sided), updating the moment an order event lands — no round-trips, no refetch interval. Watches the pool while mounted.
Background acquisition failures use the configured debug/console warning channel. Use the corresponding
useWatchMarketResult/useWatchUserResult/useWatchPriceResult hook for inline error UI.
The owner supplies blockNumber as an applied-event watermark. Heads alone
do not advance it. Expiry remains a wall-clock projection.
Parameters
pool
string | undefined
depth?
number = 10
Returns
Throws
No Markets provider is mounted.