Real-Time Updates via WebSocket
To receive recent trade executions, use the WebSocket API and subscribe to the Public Trade Stream. To bootstrap your recent trades data, send anemitPublicCompletedOrders request to receive an initial snapshot, then apply subsequent publicCompletedOrdersDelta updates sequentially.
Understanding Recent Trades Messages
- Both sides included: Each execution is represented by taker and maker sides.
- Batched messages: Updates may arrive in batches for efficiency.
- Per-market streams: Messages are emitted per subscribed market.
- Timestamps: Entries include an execution timestamp (i.e.,
updatedAtin milliseconds).
Processing Notes
- Sort or display trades by
updatedAtfor chronological views. - Use
matchIdto correlate or deduplicate multi-side entries for the same trade. - Expect batches; process sequentially to retain order.