← Technical Guides

Recover a missing IEX DEEP price level

Rebuild a synthetic IEX depth book, request missing native sequence ranges over TCP or UDP and verify original prices, sizes and stream offsets.

Open the order and depth connections

Select IEX Equities in the simulator, then select DEEP in the connection panel before downloading participant or market-data access. Set FIXSCOPE_LOCAL_MD_UDP_PORT to the port where your application listens, for example 18000. Set FIXSCOPE_LOCAL_GAP_PORT to a separate free port, for example 18001. Team UAT and CI participants can select the same feed by setting FIXSCOPE_IEX_FEED=deep. Start your UDP receiver before starting the bridge. The bridge delivers publication datagrams to that receiver and accepts both TCP and UDP recovery on 127.0.0.1:18001. The FIX order connection uses its own credentials, port and sequence. Open the simulator

Apply price levels atomically

DEEP 1.08 uses IEX-TP protocol ID 0x8004 and channel 1. Read the actual session ID from the first datagram. Each buy update (ASCII 8) or sell update (ASCII 5) replaces the entire displayed share count at that price. Zero removes the price. Buffer changes with the same event timestamp until the final level update sets bit 0 of Event Flags. A trade report (T) describes one fill and has its own trade identifier. Applying its size as another depth reduction would subtract the same fill twice. DEEP 1.08, pp. 17–20

For example, start with four shares offered at 100.00. A crossing Day buy for six shares can execute four and leave two bid at 100.00. Read the private fill on the FIX session. On DEEP, check the four-share trade, the deleted offer, and the new bid. Use the event-complete flag to decide when the new best bid and offer are ready. The simulator uses a synthetic 100-share round lot for its trade sale-condition flag. IEX market-data decoder

Repair a hole in the sequence

If sequence 4 follows sequence 2, hold the later messages while requesting sequence 3. In the native builder choose IEX-TP gap request, enter the observed feed and session, and use 3-3 for the inclusive range. Send the resulting bytes to the bridge recovery port. A valid request returns transport segments with the original sequence numbers, stream offsets and application bytes. Inspecting the new send time alone cannot identify a replay. Merge the returned messages by sequence before applying later levels. Build a gap request · IEX Transport 1.26, pp. 3–9

UDP accepts a maximum of 1,000 messages in one request. A zero-range UDP availability test returns an empty segment with the next sequence and offset. A malformed UDP request gets no segment. TCP returns the available range then closes, including when a requested end lies ahead of the publisher. Use comma-separated ascending, nonoverlapping ranges to repair separated gaps. The lab retains the latest 4,096 messages while that publication is connected. A reconnect creates a fresh session and seeds the current visible levels. The lab omits SNAP, DEEP+, auctions, trade breaks and external multicast distribution. Inspect or validate local captures