"Trade": FIX drop reconciliation
Scenario: "Trade": FIX drop reconciliation
Level: Medium
Type: Fix
Access: Email
Description: FIX (Financial Information eXchange) is a common electronic protocol for trading. Messages are tag=value fields separated by SOH (ASCII 0x01; logs here use |). A message starts with 8= (BeginString), 9= (BodyLength), 35= (MsgType) and ends with 10= (CheckSum). See FIX TagValue encoding.
Our order router sends FIX orders to the exchange gateway and gets fills back. Yesterday the session dropped for a few minutes: the gateway kept executing, the router kept sending, but some fills never made it back.
Both sides log raw FIX 4.2 under /home/admin/fix/: router.log (what the router saw) and gateway.log (authoritative). Useful tags:
35 MsgType: D = NewOrderSingle (order), 8 = ExecutionReport (fill),
5 = Logout, A = Logon, 4 = SequenceReset (session markers)
11 ClOrdID: client order ID on orders
17 ExecID: fill ID, unique per fill (e.g. EX000431)
Reconcile the two logs, find every fill the gateway executed but the router missed, and recover them by appending each missing 17=ExecID (one per line) to /home/admin/fix/fills.dat, which already holds the fills the router saw. Do not add duplicates or fills the router already has.
Credit: Alex Elliot
Root (sudo) Access: True
Test: fills.dat holds exactly the gateway's fill set: every 17=ExecID from gateway.log is present once, with no extras or duplicates.
The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can read and execute.
Time to Solve: 20 minutes.