← Technical Guides

Parse repeating groups without losing their boundaries

Walk two FIX 4.4 group layouts, including a nested party identifier, and locate the first field where a malformed group diverges.

A repeating group starts with a count and contains that many ordered entries. Its first field marks the beginning of each entry. The containing message and application dictionary determine which field plays that role. A map keyed by tag number loses both the order and the earlier values. FIX Trading Community on message structures

Two counts in a MarketDataRequest

This excerpt from a FIX 4.4 MarketDataRequest (35=V) identifies two entry types and one instrument. A bar represents a field separator.

267=2|269=0|269=1|146=1|55=LABX|

Start at NoMDEntryTypes (267). Read one entry beginning with 269=0 for bids, then another with 269=1 for offers. NoRelatedSym (146) introduces a separate group. Its first entry starts with Symbol (55). If the input instead reads 267=2|269=0|146=1|, the parser encounters a new group while still expecting a second tag 269. Reducing the count would hide evidence about what was actually sent. FIX 4.4 MarketDataRequest layout

Enter and leave a nested group

The following FIX 4.4 Parties excerpt could occur in a NewOrderSingle. The first outer entry has one subidentifier. The second has none.

453=2|448=LAB_EXEC|447=D|452=1|802=1|523=LAB_OFFICE|803=25|448=LAB_CLEAR|447=D|452=4|

The first 448 opens the executing-firm entry. Its nested count 802=1 introduces one child beginning with 523. After 803=25, the next 448 belongs to the second outer entry. There is no closing marker between levels. For this layout, sorting the fields numerically would detach the subidentifier from its parent. FIX 4.4 Parties, party subidentifiers

Locate the first disagreement

Record the message type, dictionary version, group count tag, entry index and observed tag at the first mismatch. A missing entry delimiter, a count larger than the available entries, and an unrecognised extension inside a group lead to different investigations. A private dictionary may place that extension inside the group. A baseline dictionary alone cannot establish its intended scope.

The same count tag can start different layouts even within one version. In FIX 4.4, NoMDEntries (268) opens entries beginning with MDEntryType (269) in a Snapshot and MDUpdateAction (279) in an Incremental Refresh. Select the message before deciding which tags may repeat. Inspecting market data messages