You can support this site by registering using any of the exchange affiliate links for lifetime 10% off all of your trading fees.
exchange-api crate, compiled into the WASM bundle, normalizes it into StreamData variants entirely client-sideBTreeMap keyed by price level; delta messages patch it in-place, and full snapshots replace it when the exchange emits oneexchange-api; the WASM client applies whichever sequence the exchange sends without needing to know the strategy upfrontexchange-api normalization code ships inside the WASM bundle, increasing its size compared to a thin client that only deserializes pre-normalized messagesexchange-api crate normalizes these into exchange-agnostic StreamData variants: Trade, Ticker, OrderBook, and OrderBookDeltatower-governor) enforces a 180-second reconnect window, rejecting upgrade requests that arrive too earlyStreamData types, bids and asks from multiple exchanges can be merge-sorted into a single book with an exchange column on each level. Price overlaps between exchanges (best ask on A below best bid on B) become immediately visible, laying the groundwork for cross-exchange arbitrage detection.SharedWorker or BroadcastChannel: a single tab holds the exchange WebSocket connections and fans data out to all other tabs on the same origin, eliminating the N-tabs-N-connections problem. Tabs joining later receive the cached snapshot from the worker rather than waiting for the next exchange update.wasm-bindgen-exposed mount function initialises the Leptos component into a shadow root (for CSS isolation), and a thin JS wrapper maps element attributes to config. The result is a drop-in bundle: <exchange-feed exchange="bybit" symbol="ETHUSDC">, embeddable on any page without a Leptos host.