This hook requires the
OrderbookProvider or AssetPairsProvider to be present in your component tree to provide the underlying AssetPairs instance.Import
Usage
Parameters
Initial data to hydrate the state immediately. Useful for SSR or restoring data from a persistent cache.
Return Type
State
The list of available trading pairs, filtered by
topN (liquidity) and sorted alphabetically by label.Actions
Case-insensitive search. Matches against
wsname (BTC/USD), altname (XBTUSD), displayLabel, and internal Kraken keys.Updates the liquidity filter. Note: If the state is already
loaded, changing this value triggers an automatic re-fetch.Examples
Symbol Search
UsefindSymbol for efficient lookups across multiple identifier types.
Dynamic Liquidity Filtering
Change the number of tracked pairs on the fly using thesetTopN action.
SSR Hydration
If you are using Next.js or another SSR framework, you can pass data from the server to prevent layout shifts.Related
AssetPairs Core
Explore the underlying class logic and event emitters.
useOrderbookConfig
Use symbols from this hook to open a WebSocket orderbook feed.
useOrderbookPlayback
Use historical orderbook data to travel in time.
Kraken API
Explore the
GetAssetInfo endpoint in the Kraken API docs.
