A WebSocket depth update message.

Can be either a full snapshot (action: "subscribe_depth") or an incremental update (action: "subscribe_depth_update").

interface DepthUpdate {
    action: string;
    changes?: { asks: DepthLevel[]; bids: DepthLevel[] };
    market_id: MarketId;
    onchain_timestamp?: string;
    seen_timestamp?: string;
    view?: { asks: DepthLevel[]; bids: DepthLevel[]; precision?: number };
}

Properties

action: string

The action type ("subscribe_depth" or "subscribe_depth_update").

changes?: { asks: DepthLevel[]; bids: DepthLevel[] }

Incremental changes (present on updates).

market_id: MarketId

Market identifier.

onchain_timestamp?: string

On-chain timestamp.

seen_timestamp?: string

Server-observed timestamp.

view?: { asks: DepthLevel[]; bids: DepthLevel[]; precision?: number }

Full order book view (present on snapshots).