Skip to main content
Apply in place. Discard if you’ve seen a Clear / BookInvalidated for this market without a follow-up Snapshot.

Payload

market_id
string
asset_id
string
changes
PriceLevelChange[]
Each change is { side: Bid | Ask, price, size } with absolute-replacement semantics: size > 0 sets the level; size == 0 removes it.
exchange_ts
u64?
local_ts_ms
u64
seq
u64

Example

use px_core::WsUpdate;

if let WsUpdate::Delta { market_id, changes, .. } = update? {
    let book = cache.get_mut(&market_id).expect("snapshot first");
    for c in &changes { book.apply(c); }
}