Replay CME order books from a pcap capture
Open CME MDP 3.0 pcap captures in the browser and replay order books by price and by order.
The Market Data Visualizer reads CME MDP 3.0 market data from pcap files in the browser, rebuilds every instrument's book message by message, and draws each book as a ladder with order blocks (CME MDP 3.0 packet layout). Files never leave your browser.
1. Open the sample or your own capture
The sample is a synthetic capture of three channels: ESZ6 (channel 310), MESZ6, NQZ6, MNQZ6 (channel 318), and six SOFR futures (SR3Z6 to SR3U8) plus calendar spread SR3Z6-SR3H7 (channel 312), across two files (market data and definitions). It opens on ESZ6 and NQZ6 two seconds before a simulated 13:30:00 release.
To open your own files, drop classic .pcap, .pcap.gz or .pcap.zst files (market data and definitions) on the window or replay pane. Once indexed, the pane opens the busiest instrument's book at its first trade. Every capture file of the project is in the replay; clear its in replay box in the file table (click the header summary) to replay without it, and the summary counts the files left in (1 of 2 files). Closing the replay pane keeps its layout; click the project or capture in the explorer to reopen it. File bytes are not kept across reloads; click bytes gone · add again in the file table to reattach them.
2. What the app reads
- Files: classic pcap (microsecond or nanosecond timestamps), as written or compressed with gzip (
.pcap.gz) or zstd (.pcap.zst, any number of frames). A compressed capture is decompressed once as it is added, into the browser's storage, which needs room for the whole pcap; a stream cut short or damaged is refused with the byte where it stops. Ethernet II frames (optional VLAN tag) carrying unfragmented IPv4 UDP packets; other records are counted per reason and skipped. - Feeds A and B: incremental feeds are arbitrated by
MsgSeqNum, taking whichever feed delivers a packet first. A packet missing from both feeds is a gap. Click the header summary to open the file and flow tables; Events in the header's Views menu writes the events table (find trades, resets and gaps). - Messages: fixed layouts for channel resets (
ChannelReset4), volume (MDIncrementalRefreshVolume37), book updates (MDIncrementalRefreshBook46,MDIncrementalRefreshOrderBook47), trades (MDIncrementalRefreshTradeSummary48), snapshots (SnapshotFullRefresh52,SnapshotFullRefreshOrderBook53) and definitions (MDInstrumentDefinitionFuture54,MDInstrumentDefinitionOption55,MDInstrumentDefinitionSpread56). No schema file is needed; other messages show their SBE header and raw bytes. Options definitions are decoded in the Message pane, while the instruments list tracks futures and spreads. - Without definitions: instruments appear by SecurityID, and tick size is inferred from prices seen.
3. Read the ladder
Each book pane shows bid blocks, ord, size, price, size, ord and ask blocks, one row per tick with asks above and bids below (order books by price and by order).
- Fixed rows: prices stay on their rows. When the best price leaves view, an edge marker shows the side and tick distance; click it, any price or the
Re-centrebutton over the price column in the pane's bar (two arrows meeting a line) to re-centre. - Re-centre and Follow: jumping (slider, Go to) re-centres panes whose Follow is off; stepping and playing leave rows fixed. Follow (under Display, off by default) re-centres when the best price approaches an edge; manual scrolling turns it off.
- Keys (book focused): Up/Down scroll one tick, Page Up/Down scroll a pane height, Home or
Cre-centres,]and[centre the next price above or below with resting orders (skipping implied prices),}and{centre the best ask or best bid. - Go to price: open Actions (or press
G), enter a display price (110.375) or tick count (7064t) and press Enter. A price between ticks snaps to the nearest row with a dashed outline and turns the field red; invalid text moves nothing. Escape returns to the ladder. - Display options: toggle Order blocks, Implied (adds faint
implcolumns for up to two implied levels per side), Follow and Trade colour (single colour or aggressor side) per pane.
4. Read the order blocks
Blocks sit in priority order from the inner edge (ord/size) outward, widths proportional to quantity. Queues that do not fit fold their tail into a striped block showing +N orders.
Pinch, or hold Cmd (Ctrl on Windows and Linux) with the wheel over a block column, to zoom both block columns around the pointer. Shift with the wheel (or sideways swipe) pans along queues; double-click a block column or press 0 to reset zoom (×N shows over the ask blocks while zoomed).
Hover a block for its card (order id, quantity, priority place, contracts ahead, added/changed messages, fills and match algorithm). Click a block to pin its card and show its last change message in the Message pane. Drag a pinned card (outside its message links) or focus it and press Alt/Option with arrow keys to move it; click elsewhere or press Escape to close it.
Orders from before the capture
In captures that start during a session, unexplained size inside level depth appears as one hatched block at the front of the queue. When a snapshot arrives (SnapshotFullRefresh52 and SnapshotFullRefreshOrderBook53), the app replaces partial books and removes hatched blocks. In the sample, equity channels start with a channel reset, while the SOFR channel joins from its snapshot 20 seconds in.
5. Watch trades and changes
- Fill: flashes in the trade colour. Filled orders fade out and orders behind slide forward; partial fills shrink in place.
- Cancel: fades out grey without flashing.
- Added order: fades in at the back of the queue.
- Modify: a quantity decrease shrinks the block in place; a quantity increase or price change loses priority and moves the block to the back or to the price row.
Small steps animate; frames with many changes draw at once. While paused, fills from the last step stay on the ladder as it was before the step: the traded part of a partly filled order is solid in the trade colour (−8) beside what rests, an order that left is hatched with a dashed outline (−3 ✕), and a folded queue holding fills is striped in the trade colour. The Fills pane names each fill of the books in view: instrument, order, price, contracts traded, what is left, and place in the queue. Hover a row to outline its block or a block to light its row; click a row to bring its block into view. This includes fills reached by Filter, a step of several events or Go to; dragging the slider marks nothing.
The Fills pane opens along the right edge of the books when a paused step fills orders and closes at a step without fills or when play starts. Drag its tab to put it beside, under or among the books and drag its edge to size it; the replay keeps the place. The Fills row of Display sets when it shows: on fills, always (no fills at this step when there are none) or never.
6. Play and step
All books in a project share one replay position. The replay controls run along the bottom of the pane, under the books, as a player's do. The play bar at the very bottom is a media player's row of buttons: to the start, a step back, play or pause, a step forward and to the end, with the sending time and message counter beside it; each button's tooltip names it and its key. Above it the timeline: the overview strip shows the whole capture shaded by how many messages each moment holds, with a frame around the stretch the detail strip shows; Cmd/Ctrl+wheel or a pinch zooms the detail strip, the wheel or a drag pans it, and a click seeks. Zoomed in far enough, it draws one tick per message coloured by its kind of event.
A legend under the detail strip, between the two ends of its window, names what the strips draw: messages per time for the shading, replay position for the line across both strips, detail window for the overview's frame and filter matches for the blue ticks of a filter (find trades, resets and gaps). Once the detail strip draws ticks, the legend lists each colour in it with the kinds it draws there, by the names the filter's kind takes: trade, fill share the trade colour, reset, snapshot one colour, and level, implied, remainder, volume, statistics, status and other one grey, as do messages with no events (a book or trade message that changed no book). A message of several kinds takes the colour listed first: a gap, then a trade or fill, a reset or snapshot, a definition, a delete, a modify, an add, then the rest. With a filter set, the ticks of messages it does not match are dimmed. Hover or focus a legend entry to find what it names without telling colours apart: a colour's ticks (or the filter's matches, or the dimmed ticks) reach the strip's full height and every other tick fades, fainter than the filter's dim; replay position and detail window thicken the line and the frame. The entry's tooltip counts the messages it names in the window.
Above the timeline, Filter has a row of its own. The top row of the controls has Step, how far a step moves: a count of events, packets or messages (event, packet, message) or a time in ns, µs, ms, s or min, one event unless you set another. A step of events always leaves every book whole; a step of packets, messages or a time can stop inside an event, and a time lands on the last event end sent by then. Speed is a number, decimals such as 2.5 included, and a unit: steps/s, play repeating the Step setting that many times a second (0.1 to 120), or × real time, play following the capture's own clock (0.001 to 100). Then Go to: a message number (#2,631), a UTC time (13:30:00.003509158), a move from the replay position (+250us, -1.5ms), a channel's packet by its MsgSeqNum (seq 3485 ch 312) or an instrument's update by its RptSeq (rpt 812 SR3Z6).
Anywhere in the replay pane (outside the Message pane's tree), Space plays or pauses, Left/Right step by the Step setting, Alt+Left/Right step one event whatever it says, and Home and End go to the start and the end. In Step's count, Enter steps forward and Shift+Enter back. Drag, split or tab book panes inside the replay area; Duplicate (D in Actions) opens a copy with the same settings.
7. Instruments, messages and scripting
How to use?, right after the summary in the replay header (or ? anywhere in the replay pane), dims the pane and marks one group of controls at a time, each with its number, beside a list of the six groups. Press ←/→ or a group's heading, or point at any control, to switch groups; press a row or a marked control for what the control does and its keys.
The Views menu in the replay header shows or hides the Instruments column and the Message pane, each checked while it shows, and its Events row writes and opens the events table. Filter the instruments list by symbol, SecurityID, group, product or expiry (or run Find instrument from the palette), click a row to open or focus its book, and click ▸ for its definition card (exchange, tick, display factor, match algorithm, activation and last trade times, spread legs). A row's ↗ opens the instrument's page on Structure's market explorer in a new tab, for instruments listed on CME, CBOT, NYMEX or COMEX.
The Message pane decodes the current message from pcap record through Ethernet, IPv4, UDP, MDP packet header and SBE fields beside its raw bytes; hovering a row highlights its bytes and vice versa. While its tree scrolls, the rows that hold the top row stay pinned above it, outermost first: the message, a repeating group such as .NoMDEntries, the entry [2], so you always see which entry a field belongs to. Click a pinned row to select it and scroll back to it.
To copy what the pane shows, select a row and press Cmd+C (Ctrl+C elsewhere): the row and the rows shown under it are copied as text, names indented two spaces a level, values and types in columns. The pane bar's copy copies the whole message the same way; the palette's Copy CME message with every row open copies every row of it.
Scripts can inspect ladder rows and blocks through the in-page API window.Structure.marketDataVisualizer (drive the app from a program).
Sources
Reviewed by Structure on 2026-11-25. Last changed 2026-11-26.