Skip to main content

Level 3 Market Data

· 3 min read

The level3 channel is a new market data feed which provides the visibility of individual orders in the order book.

The insight can determine queue priorities, resting times, fill probabilities and many more analytics which can help make better informed trading decisions.

Market Data Overview

Using the Kraken API channels as a reference, we consider:

  • Level 1 shows the top of the book (i.e. best bid/offer) and recent trade data. The ticker channel.
  • Level 2 shows the individual price levels in the book with aggregated order quantities at each level. The book channel.
  • Level 3 shows the individual orders in the book. The level3 channel.

Order Visibility

The level3 channel shows the orders resting in the visible order book. The book will never be crossed (i.e. no overlapping buy and sell orders). Therefore, this feed excludes:

  • In-flight orders.
  • Unmatched market orders.
  • Untriggered stop-loss and take-profit orders.
  • Hidden quantity of iceberg orders.

Building the Book

Sequencing

The level3 channel will synchronize the initial snapshot and subsequent stream of updates in a similar mechanism to book feed.

There is some complexity synchronising a snapshot and real-time updates based on sequence numbers. This channel has resolved this issue and simplifies client side code as only a single subscription request is required to build the book.

Checksum

The checksum verification is optional. It provides an additional check that the client version of the book has been constructed correctly and is synchronised to the exchange.

The checksum can be verified on in production on every update or periodically depending on requirements. Some clients generate the checksum in the development environment only when building their book models.

See the guide on level3 checksum generation.

Performance Considerations

The latency differences between the level3 and book feeds will be negligible compared to the transport time. However, here are some performance considerations you may find useful:

  • level3 is a direct stream of order events from the matching engine. The book feed contains cumulative data which is aggregated extremely efficiently in the engine. Therefore, consider both level3 and book channels as streams from the matching engine with a thin API layer.
  • level3 data payload is larger than book. It takes more time to encode, transmit over the wire and decode. It needs to describe all orders in the book not just cumulative quantity at a price level.
  • The channels are hosted on different market data stacks: level3 uses an authenticated channel, book uses public channel. Typically, the authenticated channel would have less load than public channel (but may not always be the case).
  • level3 checksum takes longer to compute than book checksum, it also verifies the sequence of orders in a price level.
  • The timestamps in both feeds enable clients create latency metrics for detailed performance tracking.