Skip to main content

Binary Framing

Binary order-entry messages use length-prefix framing over TLS.

Frame layout

OffsetWidthFieldNotes
04 bytesLengthPayload length plus fixed binary header
42 bytesMessage typeUnsigned integer enum
62 bytesFlagsReserved for negotiated features
88 bytesSequenceMonotonic per session
168 bytesTimestampClient send time
24VariablePayloadMessage-specific binary payload

All multi-byte integers are little-endian. Decimal fields use fixed-scale integer representation to avoid floating-point ambiguity.

Session sequence

Clients must increment the sequence number by one for every application message. The gateway rejects duplicates and stale sequences. Gap recovery is handled by session-level resend and state reconciliation through private streams or HTTP.

Compatibility

The flags field is reserved for negotiated feature bits. Clients must ignore unknown server feature announcements and must not send unsupported flags.

Checksums

Order-entry frames are protected by TLS transport integrity. Optional payload checksums can be negotiated for high-throughput market-maker sessions.