Using Versioned SBE Responses in Spot Trading APIs
Summary
This FAQ explains how to request and decode Simple Binary Encoding (SBE) responses from spot REST, WebSocket, and FIX APIs. It outlines the request headers or connection parameters needed to select SBE and a schema version, describes when requests fall back to JSON or return errors, and explains how to generate decoders from the supplied XML schemas. SBE is presented as a low-latency serialization format based on the FIX SBE specification.
The guide also covers schema compatibility and lifecycle: breaking changes increment the schema ID, non-breaking changes increment its version, and deprecated schemas remain supported for at least six months. Responses to deprecated-version requests may use the highest compatible version, so decoders must handle schema extensions. Additional format details include separately encoded decimal mantissas and exponents and timestamps expressed in microseconds rather than JSON's default milliseconds. This is API integration guidance rather than a trading strategy; it gives implementation behavior but no evidence about trading performance or measured latency gains.
Key ideas
- SBE responses can be requested through spot REST, WebSocket, and FIX interfaces using interface-specific schema settings.
- The response format and error behavior depend on the requested format, schema parameters, and whether SBE is enabled.
- Schema IDs change for breaking updates, while schema versions change for non-breaking updates.
- Deprecated schemas remain supported for at least six months, and responses may use a higher compatible version.
- SBE decimal fields encode mantissas and exponents separately, and timestamps use microseconds.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.