Skip to main content
Emitted on initial subscribe and after any recovery. Replace any cached book keyed by (market_id, asset_id).

Payload

market_id
string
asset_id
string
book
Orderbook
Full L2 book with sorted bids / asks.
exchange_ts
u64?
Exchange-authoritative millis when provided.
local_ts_ms
u64
Wall-clock millis at socket-read.
seq
u64

Example

use px_core::WsUpdate;

while let Some(update) = updates.next().await {
    if let WsUpdate::Snapshot { market_id, book, .. } = update? {
        cache.insert(market_id, book);
    }
}