We just released our Beginner Hardware Design roadmap. We're leaning into HWE interview preparation. The price will rise as the content expands.

Logo

Markety data streams

What this preview is

Markety data streams is a easy quant coding problem on language knowledge in Python, asked at Quant.

Difficulty
Easy
Topic
Language Knowledge
Discipline
Quant development
Language
Python

Building an order book processor with out-of-order event handling

This easy Python coding problem tests your ability to design a system that processes market data streams in the correct sequence, even when messages arrive out of order. It's representative of work quant trading firms do to maintain accurate, real-time order books from exchange feeds.

The core challenge is managing state across four event types (ADD, CHANGE, DELETE, DISCONNECT) while respecting sequence numbers rather than arrival order. You'll need to buffer out-of-order events, handle connection resets that require snapshot reconstruction, and apply subsequent updates correctly. The problem rewards clean separation of concerns: buffering logic, event application logic, and book state management.

  • Out-of-order message queuing and sequencing
  • Mutable data structures (bid/ask dictionaries) and their efficient update
  • State machine transitions (connected vs. disconnected)
  • Handling snapshot recovery and event replay after disconnect

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.