Basic Prerequisites: 02 · The FIX Protocol and basic binary/struct manipulation.
1. Intuition & Practical Objective
FIX’s readability is bought with bytes: ASCII, a tag= prefix per field, and a SOH per field. At tick level that overhead becomes the bottleneck, so venues publish native binary protocols for market data (Nasdaq’s ITCH) and order entry (OUCH), while the industry builds compact encodings - FAST, Simple Binary Encoding (SBE) - to keep FIX’s semantics at a fraction of the bytes. This page is the launchpad: it shows what a binary venue message actually looks like on the wire, how delta/dictionary compression works, and where the modern extensions (FIXP/FIXT, FIXatdl, FIXML) fit.
The one idea: binary protocols trade recoverability for bytes. FIX is self-describing and self-recovering; a binary feed is neither - you must know the schema out-of-band and rebuild state from a snapshot plus an incremental stream. You pay in complexity for the nanoseconds.
2. Mathematical Ground Truth & Derivations
Encoding efficiency. For a field of value , the FIX ASCII form costs bytes (tag, =, SOH), while a fixed-width binary form costs a constant bytes. The ratio is the compression:
For a price like 44=150.5250 (11 bytes) vs a 4-byte fixed-point integer, .
Fixed-point prices. Binary feeds do not send floats; they send scaled integers:
with the venue’s price decimal places (ITCH 5.0 uses ). This is exact and deterministic - floating point has no place on the wire.
Delta encoding (FAST). Instead of the absolute value, transmit the difference from the previous one, so a slowly-moving field costs a few bytes:
For a price series the deltas are small and clustered near zero, which makes them cheap under a variable-length integer code. Crucially, delta encoding requires the receiver to have the same previous value - a lost message corrupts every subsequent delta until a snapshot resynchronises. This is exactly the recovery fragility FIX’s sequence numbers exist to prevent.
Field-count and schema. A binary message is decoded by a schema (tag → offset/width/type). Message size is the sum of field widths plus any header:
versus .
Blended architecture. Modern stacks run both: a binary feed for market data, and FIX (or OUCH) for order entry - the split-horizon design. The market-data side optimises for bytes and decode speed; the order-entry side keeps FIX’s recovery semantics because an order must never be silently lost.
Gateway clustering. Independent replicated gateways raise availability as (see 04), but clustering adds a coordination cost: session state (sequence counters, the outbound log) must be shared, so the design is really a distributed sequence-number store with a single-writer guarantee per session ID.
3. Computational Implementation - binary wire + delta compression
We parse a synthetic Nasdaq TotalView-ITCH 5.0 Add Order message with struct, then demonstrate FAST-style delta encoding round-trip and measure the encoding ratios. Stdlib only.
Read it as the tradeoff in numbers: an ITCH Add Order is 38 bytes against ~150 for the FIX equivalent (≈3.95× fewer bytes), a single price field is 2.75× smaller, and delta encoding round-trips losslessly because the receiver always reconstructs from the same running base. That is the whole business case for binary venue protocols - and the reason the recovery complexity moves into your code.
4. Failure Modes & First-Principles Breakdowns
- Delta-desync after a lost message. Because depends on , one missed binary message corrupts every subsequent delta. Binary feeds therefore require periodic snapshots and gap-detection by sequence number in the feed itself - the same principle as FIX resend, implemented differently.
- Schema drift / out-of-band schema. A binary message is meaningless without the right schema version; a venue that adds a field silently shifts every following offset. Pin schema versions and reject on mismatch.
- Floating-point on the wire. Encoding price as a float is non-deterministic across platforms; use scaled integers () and do the arithmetic in integers or exact decimals.
- Losing recovery semantics. A system that moves order entry to a bare binary protocol and drops sequence-number journaling loses the very property FIX provided. Keep the recovery layer regardless of encoding.
- Tick-size / decimal-place mismatch. Assuming for a venue that uses misprices by (ITCH 5.0 uses 4 decimals; others differ). The scaling constant is part of the contract, not an assumption.
- Clustered-gateway coordination bugs. A replicated sequence-number store without a single-writer guarantee can mint duplicate sequence numbers - silently duplicating orders. The store must serialise per session ID.
- Over-optimising the feed and under-testing order entry. The classic imbalance: a hand-tuned FPGA feed decoder wired to an uncertified order path. Certification (see 05 · Failure Modes) covers the order path that carries the money.
Where the modern extensions fit.
- FIXT.1.1 / FIXP - a transport split from the application version (FIXT.1.1 session carrying, e.g., FIX.5.0 messages), so session semantics evolve independently of the business messages.
- SBE (Simple Binary Encoding) - a fixed-offset, schema-driven binary encoding of FIX semantics; the low-latency industry’s answer to “FIX messages, but binary”.
- FAST - FIX Adapted for STreaming; dictionary + delta + variable-length coding for market data.
- FIXML / FIX Orchestra - an XML/schema representation of FIX used for data dictionaries, code generation, and machine-readable specs.
- FIXatdl - XML descriptions of algorithmic-trading strategies, letting one algo be expressed venue-agnostically; relevant once a team ships multiple execution algos.
5. References
- Nasdaq, TotalView-ITCH 5.0 Specification
- Nasdaq, OUCH Specification
- FIX Trading Community, FAST Specification and Simple Binary Encoding (SBE)
- FIX Trading Community, *FIX Protocol
- De Schryver, Christian (ed.), FPGA Based Accelerators for Financial Applications (Springer, 2015)
6. Connected Graph Bridges
- Back: 05 · Failure Modes · 02 · The FIX Protocol · Index Hub
- Sibling: Hardware Acceleration & FPGA (decoding ITCH in hardware)
- Sibling: Tick-Level Databases & Time-Series (storing the decoded feed)
- Context: Low-Latency Linux & Networking · Low-Latency Systems Architecture