Skip to main content
This hook requires the OrderbookProvider to be present in your component tree and history recording must be enabled (via historyEnabled). The number of snapshots available depends on maxHistoryLength.

Import

Usage


Return Type

State

number
The current number of items in the buffer.
boolean
Helper indicating if the buffer contains zero snapshots.

Actions

(index: number) => OrderbookData | undefined
Retrieves a specific snapshot by index.
() => OrderbookData[]
Returns the entire array of snapshots currently in the buffer.
() => OrderbookData | undefined
Returns the most recent snapshot in the history.

Orderbook Core

Explore the underlying class logic and event emitters.

useOrderbookConfig

Configure historyEnabled and maxHistoryLength to manage memory usage.

useOrderbookPlayback

Use historical orderbook data to travel in time.

Kraken API

Explore the book channel streams level 2 order book docs.