Skip to content
All library documents

Binance SBE Market Data Streams and Order Book Updates

Article Binance API docs

Summary

This document describes Binance’s SBE WebSocket feeds for spot market data, including trades, best bid and ask updates, incremental depth changes, and partial book snapshots. It explains how to connect to one or multiple streams, authenticate with an API key, handle ping and pong frames, and manage connection shutdowns. The depth-difference feed is intended for maintaining a local order book, while partial snapshots provide a limited view of the book’s top levels.

Operational constraints shape how clients should consume these feeds: connections have a finite lifetime, stream subscriptions and connection attempts are limited, and each connection can listen to a capped number of streams. Best bid and ask updates use per-symbol auto-culling under load, so stale queued updates may be discarded in favor of newer ones. This reduces delayed data but means clients should account for skipped intermediate updates. The document is an interface guide; it gives no latency measurements, trading results, or detailed instructions for reconstructing a book beyond pointing to separate guidance.

Key ideas

  • The feeds provide real-time trades, best bid and ask updates, and order book data in SBE format.
  • Incremental depth events can be used to maintain a local order book.
  • Best bid and ask updates may discard stale queued events during high load.
  • Clients must handle authentication, heartbeat frames, connection lifetimes, and subscription limits.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.