Exchange Wire Formats

Exchange wire formats

Every exchange streams market data in its own format. We map each one onto one schema per data type. The pages in this section show real messages from each exchange next to the exact rows we publish for them, column by column.

How a message becomes a row

  1. Collect. Our collector subscribes to the exchange's public WebSocket channels and polls REST endpoints where an exchange has no stream (for example order book snapshots and some open interest feeds). It stamps every message with our receive time and stores it in an hourly raw file.
  2. Parse and check. After the hour closes, a postprocessor for the exchange parses the stored messages with the exchange's own field names, checks order book sequences and applies the rules shown on each exchange page.
  3. Write. It writes one Parquet file per exchange, symbol, data type and hour, with the same columns for every exchange.

Conventions

  • received_time is our collector's clock when the message arrived, in nanoseconds since the Unix epoch. It is the only column no exchange sends, and files are partitioned by it.
  • Exchange timestamps such as event_time are copied as the exchange sent them, in milliseconds unless the exchange page says otherwise.
  • Prices, quantities, rates and volumes are strings. Where the exchange sends decimal strings, we keep its exact digits, so 85583.10 stays 85583.10. The exchange pages say where an exchange sends JSON numbers instead.
  • A column the exchange does not provide is null. Where the schema needs a value that an exchange does not send, the rule says which fixed placeholder we write.
  • Order books have one row per price level. snapshot rows describe the full book at that point; update rows set the quantity at one price, and a zero quantity removes the level. A message that carries sequence IDs but no levels (an empty snapshot, or an update that only advances the sequence) becomes one row with side noop and price and quantity 0, so the sequence stays continuous. An empty noop snapshot clears the book.

The pages describe the current pipeline. Files written before a change can differ; such changes and corrections to published history are listed on Known Gaps & Corrections.

Coverage by exchange

How these pages stay correct

The examples are stored as the exact text the exchange sent. Our test suite replays each one through the production collector parser and the exchange's postprocessor, and fails if the published rows differ from the rows on the page, or if a column's source path is not in the message. A change to how we map an exchange cannot ship without an update to its page. Known exceptions and corrections to published history are on Known Gaps & Corrections.