Binance SBE Explained: What Simple Binary Encoding Is and How to Use It on REST, WebSocket and Market Streams (2026)
The short answer
Binance SBE is Simple Binary Encoding, a compact binary format that Binance's Spot API can return instead of JSON so that trading programs spend less time sending and parsing data. You switch it on per request: on REST you send Accept: application/sbe plus an X-MBX-SBE: <id>:<version> header, on the WebSocket API you add responseFormat=sbe with a schema ID and version to the connection URL, and for live market data you connect to the separate stream-sbe.binance.com endpoint with an Ed25519 API key. As of 21 October 2026, the latest production schema in Binance's public repository is id 3, version 5, released on 7 July 2026.
Show less
What SBE is, in plain words
JSON is text. Every price, quantity and field name travels as readable characters, and your program has to turn that text back into numbers. SBE, a standard published by the FIX Trading Community, sends the same information as fixed binary fields described by an XML schema. Both sides know the layout in advance, so messages are smaller and decoding is a matter of reading bytes at known positions. Binance's own FAQ describes SBE simply as a serialization format used for low latency.
Who needs it? Mostly people running automated strategies, market makers and anyone maintaining a local order book where milliseconds and CPU time matter. If you place a few manual trades a day in the app, SBE changes nothing for you. If you run a bot that reads depth updates for dozens of symbols, it can cut bandwidth and parsing work.
Where Binance supports SBE
Article table: scroll horizontally, or focus the table area and use the arrow keys.
| Interface | How to request SBE | What happens if SBE is unavailable |
|---|---|---|
| REST API (Spot) | Accept: application/sbe and X-MBX-SBE: <ID>:<VERSION> | With only application/sbe: HTTP 406 if SBE is not enabled. With application/sbe and application/json together: falls back to JSON |
| WebSocket API (Spot) | Add responseFormat=sbe&sbeSchemaId=<ID>&sbeSchemaVersion=<VERSION> to the URL | HTTP 400 during the handshake; handshake errors are JSON |
| FIX API | See the SBE section of Binance's FIX documentation | Rejected per FIX rules |
| SBE Market Data Streams | Connect to stream-sbe.binance.com (or port 9443) with an Ed25519 API key in X-MBX-APIKEY | Separate endpoint; JSON streams stay on the normal stream host |
Binance's FAQ says the REST API, WebSocket API and FIX API for Spot all support SBE. The documentation we read covers Spot; check the separate futures docs before assuming the same headers work there. Our Binance exchange profile summarises the venue's products and fees if you are still deciding where to run a bot.
Step by step: your first SBE request
- Pick the schema. Download
spot_prod_latest.xmlfor the live exchange orspot_testnet_latest.xmlfor Spot Testnet from Binance'sbinance-spot-api-docsrepository on GitHub. FIX users need the separatespot_fix_prod_latest.xmlfiles. - Generate a decoder. Binance points to the open-source
simple-binary-encodingproject by Real Logic: clone it, build it with Gradle and run its SbeTool code generator against the schema. Binance publishes sample apps in Java, C++ and Rust that decode the Exchange Information response. - Send a test request. The FAQ's example asks REST
exchangeInfofor BTCUSDT with the headersAccept: application/sbeandX-MBX-SBE: 1:0. Use whatever id and version your decoder was built from. - Add JSON fallback while testing. Putting both
application/sbeandapplication/jsonin the Accept header means a bad schema header or disabled SBE returns JSON instead of an error, which makes debugging easier. Remove it later if you want failures to be loud. - Mind the units. SBE timestamps are in microseconds, while JSON responses use milliseconds by default. Decimal values arrive as a separate mantissa and exponent, so your code must combine them; the schema's
mbx:exponentattribute tells you which exponent belongs to which field.
Check regional eligibility and account terms
Open →SBE market data streams
For live prices, Binance runs a dedicated host, stream-sbe.binance.com. Its rules differ from the regular JSON streams in ways that catch people out:
- An API key is required, and only Ed25519 keys are accepted. No extra permissions are needed for public data, but an IP whitelist on that key still applies.
- A single connection lasts at most 24 hours; expect a disconnect and reconnect logic.
- The server pings every 20 seconds and closes the connection if it gets no pong within a minute.
- Each connection can listen to up to 1,024 streams, client messages are limited to 5 per second, and each IP may make 300 connection attempts every 5 minutes.
- Subscriptions are JSON text frames; market data arrives as SBE binary frames. A
serverShutdownevent, also JSON, warns you to reconnect.
Available streams include trades (<symbol>@trade, real time), best bid/ask (<symbol>@bestBidAsk, real time), diff depth (<symbol>@depth, every 20 ms) and partial book depth (<symbol>@depth20, every 50 ms). The best bid/ask stream uses auto-culling: under heavy load the system drops an older undelivered update for a symbol and sends only the newest one, which is what a trading bot usually wants.
Schema versions and why your bot can break
Binance versions schemas with two numbers. The id rises on a breaking change and resets version to 0; version rises on a non-breaking change. When a new schema goes live, the previous one is deprecated even if the change was minor, and a deprecated schema is supported for at least six months. After that it is retired, and requests that name a retired schema fail with HTTP 400 on REST and WebSocket.
Binance's production life-cycle file currently lists 3:5 as latest, 3:4 and 3:3 as deprecated, and everything older as retired, from 1:0 through 3:2; schema 3:2 was the most recent to retire, on 25 September 2026. If your decoder was built on an old schema, deprecated requests are answered in the highest compatible version and flagged with an X-MBX-SBE-DEPRECATED header on REST or a sbeSchemaIdVersionDeprecated field on WebSocket. Log those flags; they are your warning before a hard failure.
We compared how Binance and Coinbase handle schema control in our Binance SBE vs Coinbase market data checklist, which is useful if you run bots on more than one venue.
Should you switch to SBE?
Switch if latency or bandwidth is a real constraint: many symbols, depth streams, or co-located infrastructure. Stay on JSON if you trade a handful of pairs, value easy debugging, or use a library that already handles JSON well. A middle path is to use SBE only for the hot market-data path and keep account and order endpoints in JSON until your decoder is proven.
How to act on this
If you are building a Binance bot, test on Spot Testnet first, then move to a live account once your decoder handles schema deprecation cleanly. If you do not have a Binance account yet, you can register with code 11350287 from our Binance page, which also lists current fees and products. Compare Binance's trading costs with other venues on the fee comparison page before you scale a strategy.
Quick answers
What does SBE stand for on Binance? Simple Binary Encoding, a binary serialization standard from the FIX Trading Community that Binance uses for low-latency API responses.
Which header turns on SBE for Binance REST?
Accept: application/sbe together with X-MBX-SBE: <schema id>:<version>, for example 1:0 in Binance's sample.
What is the latest Binance SBE schema? Binance's production life-cycle file lists schema 3:5, released 7 July 2026, as the latest as of 21 October 2026.
Do I need an API key for SBE market data?
Yes. The stream-sbe.binance.com streams require an Ed25519 API key sent in the X-MBX-APIKEY header, without extra permissions.
Why are SBE timestamps different from JSON? SBE timestamps are in microseconds; JSON responses use milliseconds by default.
Topic hubs & tools:Exchange API & market data controls
Check regional eligibility and account terms
Open →