Skip to main content
WSS
This user-scoped stream uses (feedEpoch, globalUserSeq). Without seq, it sends a complete finalized balance snapshot, replays retained updates after that snapshot, and then joins live delivery. It also sends a complete snapshot every five seconds by default. Incremental updates default to 300 milliseconds. Market makers seeking earlier updates can use @p or @v in production, provided they track tentative state by block ID and reconcile branchDropped. Use @f when finalized state is required. Initial snapshots are finalized; periodic snapshots use the selected view. Durations are internally floored: 0–99 → immediate, 100–299 → 100 ms, 300–499 → 300 ms, and 500 or greater → 500 ms. The default is 300 ms. Use @0 for delivery without intentional batching; @1 has the same behavior. Periodic full snapshots remain enabled. See delivery cadence and branch reconciliation for the view semantics and delivery cadence for limits.

Subscribe

Decoded event

The shape below is the inner message returned by decodeExchangeWsEnvelope or decodeExchangeWsMessage. Every binary socket message also carries an outer id: bigint, matching your subscription ID. Use it to route snapshots, replay, and live updates. See binary subscription envelopes.
Balance values use each token’s native decimal units. A snapshot has stateHead; an incremental frame has sourceBlock. Replace local balance state when snapshot=true. For an explicit replay cut R, accept the first publication when globalUserSeq > R and previousGlobalUserSeq is null or at most R. After that sparse bridge, every subsequent previousGlobalUserSeq must equal the last accepted globalUserSeq exactly.
userBalances subscription
type:object