WebSocket katas
Order Book
A small collection of order book exercises for streaming market data, handling connection state, and practicing resilient WebSocket clients.
WebSocket Echo
Connects to Hyperliquid's WebSocket API and echoes recent ETH trades.
Reconnect
Wraps the WebSocket with reconnect handling and a simulated drop flow.
Sequence gap
L2 book stream with reconnects so you can think about gaps and resync.
Sorted side
A decimal-safe RBTree demo for keeping bids and asks in sorted order.
Apply delta
Immutable applyDelta function — turn snapshot diffs into book updates.
rAF batcher
Coalesce WebSocket updates to one React render per animation frame.
Web Worker
Offload parse and applyDeltas to a worker; main thread only paints.