Net Filled Quantity From Raw FIX Execution Reports

Last updated: November 29, 2026

Quick Overview

Given a list of raw FIX 4.4 messages delimited by the SOH character, validate each checksum, keep only execution reports that are trades, and return the signed net filled quantity per symbol plus a count of rejected messages.

DRW
Coding & Algorithms
Software Engineer
DRW
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

0

0 solved


Given a list of raw FIX 4.4 messages delimited by the SOH character, validate each checksum, keep only execution reports that are trades, and return the signed net filled quantity per symbol plus a count of rejected messages.

DRW connects to many exchanges and brokers over FIX, so a first-round screen often starts with parsing a realistic wire format. The interviewer checks that you handle the tag=value layout, the checksum rule, and malformed input without crashing, and that the code reads like something you would put on a drop copy.

What the Interviewer Expects
  • Splits on SOH and maps integer tags to string values
  • Computes the checksum as the byte sum mod 256 of everything before the 10= field
  • Filters on MsgType 8 and ExecType F, signs quantity by Side
  • Counts malformed or bad-checksum messages instead of raising
  • States complexity linear in total message bytes
Key Topics to Cover
string parsing
FIX protocol
checksums
hash maps
input validation
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you handle repeating groups where the same tag appears several times?
  • How would you parse a continuous TCP byte stream where messages can be split across reads?
  • Would you trust tag 32 or recompute fills from cumulative quantity tag 14, and why?
  • How would you make this allocation free for a latency sensitive path?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Each message is tag=value pairs separated by \x01, ending in 10=NNN\x01. The checksum is the sum of every byte up to and including the SOH before 10=, mod 256, written as three digits. We want...

High-Level Design

Two small helpers keep concerns apart: checksum_ok works on raw bytes before parsing, so a corrupted message never reaches business logic, and parse turns the message into a dict, raising on anyth...


Submit Your Answer
Markdown supported

Related Questions