SBE Market Data Streams
General Information
- The base endpoint is stream-sbe.testnet.binance.vision or stream-sbe.testnet.binance.vision:9443.
- To retrieve market data in JSON format, please refer to this page.
- SBE schema used for decoding the streams can be found here.
- All symbols in stream names are lowercase.
- You can subscribe to a single stream at /ws/<streamName>.
- You can subscribe to multiple streams at /stream?streams=<streamName1>/<streamName2>/<streamName3>.
- A single connection to stream-sbe.testnet.binance.vision is only valid for 24 hours; expect to be disconnected at the 24 hour mark.
- A
serverShutdownevent will be sent when the server is about to shutdown, resulting in disconnection. Please establish a new connection as soon as possible to prevent interruption. - All time and timestamp fields are in microseconds.
- An API Key is necessary for access.
- Only Ed25519 keys are allowed.
- Please put your API Key in the
X-MBX-APIKEYheader when opening the connection. Timestamp and signature are not necessary. - No extra API key permissions are necessary to access public market data. Symbol whitelist also does not affect access to SBE Market Data Streams.
- However, if you use an IP whitelist for the API key, only specified IP addresses are allowed to use the API key.
- The server sends a
ping frameevery 20 seconds.- If the server does not receive a
pong frameback from you within a minute, the connection will be closed. - When you receive a ping, you must send a pong with a copy of ping's payload as soon as possible.
- Unsolicited
pong framesare allowed, but will not prevent disconnection. It is recommended that the payload for these pong frames are empty.
- If the server does not receive a
- Live Subscribing and Unsubscribing is also supported.
- You must send subscription requests in JSON in WebSocket text frames. You will receive subscription responses in JSON in WebSocket text frames.
- You will receive
serverShutdownevents in JSON in WebSocket text frames. - You will receive market data events in SBE in WebSocket binary frames.
- If your request contains a symbol name containing non-ASCII characters, then the stream events may contain non-ASCII characters encoded in UTF-8.
WebSocket Limits
- WebSocket connections have a rate limit of 5 requests per second.
- Only messages from your client are considered:
PING framePONG frameText framewith JSON control request
- Events pushed by the server are not rate-limited.
- Connections that go beyond the limit will be closed. Repeatedly disconnected IP addresses may be banned.
- Only messages from your client are considered:
- A single connection can listen to a maximum of 1024 streams.
- There is a limit of 300 connection attempts every 5 minutes per IP address.