@somnia-chain/markets-sdk / react / useLiveSpotOrderBook
Function: useLiveSpotOrderBook()
useLiveSpotOrderBook(
pool,depth?):SpotOrderBook
Defined in: packages/sdk/src/hooks.ts:417
The locally-materialized resting book of a spot pool, 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 the same per-scope blockNumber as its native live read.
It is absent until hydration supplies provenance.
Parameters
pool
string | undefined
depth?
number = 12
Returns
Throws
No Markets provider is mounted.