Orderbook.Root component.
It controls how the component connects to the Kraken WebSocket API, manages incoming price level data, and handles connection failures gracefully.
Properties
The trading pair symbol to subscribe to. Must match Kraken’s WebSocket symbol format.Examples:
BTC/USD, ETH/EUR, XRP/GBP, SOL/USDTChanging the symbol at runtime will close the existing WebSocket connection and establish a new subscription. Use stable state management to avoid unnecessary reconnections.
The subscription depth requested from Kraken’s WebSocket API. This determines how many price levels the exchange will send in the initial snapshot and maintain throughout the session.Allowed values: Impact on performance:
10, 25, 100, 500, 1000- Lower depth (10-25): Minimal network traffic, fastest updates, suitable for high-frequency trading interfaces
- Medium depth (100): Balanced approach for most applications
- Higher depth (500-1000): More complete market view, increased bandwidth usage
Maximum number of price levels to keep in memory and make available to your components, per side (bids and asks are counted separately).This acts as a client-side filter on top of the Memory considerations:
depth setting. Even if you subscribe to depth: 1000, setting limit: 50 will only retain the top 50 price levels.- Each price level stores: price (number), quantity (number), and timestamp
- 50 levels ≈ 2KB per side
- 100 levels ≈ 4KB per side
- 500 levels ≈ 20KB per side
The minimum price increment (tick size) for the trading pair. This value is used for price rounding and validation throughout the orderbook.If not provided, the component will automatically fetch this value from Kraken’s asset pairs metadata endpoint. However, explicitly setting it can reduce initialization time.Common tick sizes:
- BTC/USD:
0.1($0.10) - ETH/USD:
0.01($0.01) - XRP/USD:
0.0001($0.0001)
When
tickSize is not provided, the component will show a brief loading state while fetching asset pair metadata.Groups adjacent price levels into buckets of this size, reducing visual noise and improving performance when displaying deep orderbooks.A value of Grouping examples for BTC/USD at $45,678:
0 (default) disables grouping.spreadGrouping: 0- Individual levels: 45,678.20, $45,678.30…spreadGrouping: 1- Grouped by 45,678.00-45,679.00, $45,679.00-45,680.00…spreadGrouping: 10- Grouped by 45,670.00-45,680.00, $45,680.00-45,690.00…spreadGrouping: 100- Grouped by 45,600.00-45,700.00, $45,700.00-45,800.00…
- Reduces number of rendered rows
- Smooths out micro-fluctuations
- Improves rendering performance
- Better overview of market depth
Configuration for automatic reconnection behavior when the WebSocket connection is lost or encounters an error.
Enables verbose console logging for debugging purposes. When enabled, the component logs connection events, data updates, errors, and internal state changes.Logged information includes:
- WebSocket connection state changes
- Received message payloads
- Pipeline processing steps
- Error details and stack traces
Related
Performance
Fine-tune update frequency with throttling and debouncing options.
History
Enable snapshot tracking and playback features for historical analysis and debugging.
Asset Pairs
Configure how trading pair metadata is fetched and cached. Required for auto-populating
tickSize.Overview
See all configuration options in one place with complete TypeScript types and defaults.

