Skip to content

Repository files navigation

CAT File Viewer

Version v2026.08.21

Copyright (c) 2026 Mark Kim. Licensed under GPL-2.0.

A browser-based viewer for Consolidated Audit Trail (CAT) data files, built for compliance officers and operations teams at broker-dealers and trading firms.

Supports CAT Technical Specifications for Industry Members v4.1.0 r15.

Disclaimer: This application was developed with the assistance of AI. It should be used with caution and is not a substitute for professional review. Users are responsible for verifying the accuracy of any data presented.

Usage

Live version: https://app.cbreak.org/catviewer/

Open index.html in any modern browser. No server, build step, or dependencies required.

  1. Drag and drop a CAT data file (JSON, CSV, ZIP, or GZIP) onto the page (or click to browse). Multiple files supported; hold Shift while dropping to append.
  2. Browse, filter, sort, and inspect records
  3. Export filtered results to CSV

Supported Formats

  • JSON — NDJSON (one JSON object per line) or JSON arrays, per the CAT Technical Specifications
  • CSV — Positional field format (no header row) as defined in the CAT spec. All 99 event types (39 equity, 35 options, 25 multi-leg) are mapped to named fields per the spec, with each event type having its own distinct field schema.
  • ZIP — ZIP archives containing JSON or CSV CAT files (extracted in-browser using native APIs)
  • GZIP — Gzip-compressed JSON or CSV files (.json.gz, .csv.gz, etc.), decompressed in-browser

Features

  • Sortable, paginated records table with multi-column sort (Shift+click), 3-state cycle (asc/desc/unsort), priority column ordering, and configurable page size (50/100/250/500/All)
  • Column manager — show, hide, and reorder columns with search highlighting and layout persistence
  • Sticky header — stays visible while scrolling through records
  • Color-coded event types — orders, routes, trades, cancels, modifications, quotes, and allocations are visually distinguished
  • Dynamic filters — searchable, collapsible comboboxes with range support for event type (with detailed descriptions), action type (NEW/RPR/COR/DEL), side (Buy/Sell/Short), error code, and free-text search across all fields; filter layout persists across sessions
  • Record detail panel — fixed and resizable at the bottom of the viewport with animated slide-up/down transitions and translated/original view modes
  • Translated display — human-readable timestamps (string format and epoch nanoseconds → Eastern Time), dates, side codes, and compound fields (legDetails, buyDetails, sellDetails, clientDetails, firmDetails)
  • Side-slot columns — side-detail compound arrays are flattened into positional side1.* (buy/client side) and side2.* (sell/firm side) columns, so trades (buyDetails/sellDetails) and fulfillments (clientDetails/firmDetails) line up in the same columns. All subfields (orderID, side, quantity, firmDesignatedID, accountHolderType, originatingIMID, orderKeyDate, BFMMFlag) are shown by default, grouped per slot; the orderID cells carry a role chip (B/S/C/F for the source array) and clickable orderID linkage. The raw compound columns are hidden by default and available via the column manager. Slot columns support sorting, filtering, and CSV export like regular columns, and surface their source field's validation errors. Arrays with more than one element show a "+N" chip — open the record's detail panel for the full list
  • Clickable linkage fields — navigate between related records via orderID, tradeID, fulfillmentID/priorFulfillmentID, allocationID/priorAllocationID, quoteID/routedQuoteID/receivedQuoteID, RFQID, parentOrderID, priorOrderID, routedOrderID, etc.; clicking clears other active filters. Events without a top-level orderID (Order Trade and Order Fulfillment events like MEOT/MEOF) are linked to orders via the orderIDs inside their side details (buyDetails/sellDetails/clientDetails/firmDetails). Nested orderID linkage works for any compound array field on any event type (side details plus aggregatedOrders/askAggregatedOrders/bidAggregatedOrders), so orderID links, the orderID filter, free-text search, and order chain views all include these events — filtering by an order ID also shows the trades/fulfillments that reference it in their side details, and the orderID filter dropdown lists orderIDs that appear only inside compound arrays
  • Order chain view — hierarchy tree showing parent/child order relationships with depth controls (This order, + Children, + Branch); buttons toggle off when clicked again; + Children shows all descendants; Branch shows direct ancestor chain plus descendants, excluding siblings; when events share a timestamp, order-origination events (MENO/MEOA/MECO/MEIR and options/multi-leg equivalents) list first, then their supplements (MENOS/MONOS/MLOS), then other events
  • URL deep linking — hash-based URL state with direct links to selected records
  • Multi-file support — load multiple files (JSON, CSV, ZIP, GZIP) via drag-and-drop or file picker; hold Shift to append
  • File validation — verifies files are CAT format before loading
  • Tools menu — keyboard-accessible dropdown with layout export/import for sharing between users/machines, drag-and-drop layout reordering, validation toggle, and performance panel toggle
  • Virtual scrolling — efficiently renders large datasets by only drawing visible rows; sub-pixel-accurate column width measurement ensures columns are never clipped
  • Timeline visualization — canvas-based interactive timeline showing order events as color-coded dots in hierarchical swimlanes:
    • Parent-child order hierarchy with connector lines and collapse/expand controls
    • Prior order chain merging — orders linked via priorOrderID share a single swimlane with diamond markers at orderID transitions
    • Trade and fulfillment events (MEOT/MEOF and variants) appear on the lane(s) of the order(s) referenced in their side details — an event referencing both a buy and sell order shows on both lanes
    • Adaptive time axis from nanosecond to decade granularity with date pills at midnight boundaries
    • Kinetic scrolling with momentum, Ctrl/Cmd+wheel zoom, pinch-to-zoom on touch devices
    • Fit-all button to reset zoom and scroll; highlighted when zoomed/panned away from home
    • Heatmap scrollbars showing color-coded event density
    • Validation badges on event dots — red triangle with "!" for errors, amber for warnings — drawn at the top-left of each dot (matches the Records tab row indicator), with error/warning counts shown in the hover tooltip
    • Selection highlighting across lane, time crosshair, and scrollbar markers; integrates with the record detail panel
    • Cross-tab selection sync: selecting in Records scrolls the timeline to that event; selecting in the timeline updates the Records page and scroll position (smooth animated transitions)
  • Event Summary tab — counts by event type and action type
  • Raw Data tab — parsed JSON view of loaded records
  • CSV export — download filtered results
  • Schema validation — field-level validation against the CAT spec (togglable via Tools menu, enabled by default) with cell highlighting, error tooltips, detail panel badges, validation summary stats, "Errors Only" filter, error code filter, and per-error ignore/dismiss with managed ignored errors list. Deep validation of compound array fields (legDetails, buyDetails, sellDetails, aggregatedOrders, clientDetails, firmDetails), timeInForce name/value pairs (boolean vs non-boolean types), handlingInstructions attributes, and bidRelativePrice/askRelativePrice NVP attributes. Errors in nested fields are highlighted at the cell level within detail panel tables. CAT error codes from Table 177 (Data Ingestion Errors) shown in tooltips and badges (e.g., [2026], [2143]). ~65 cross-field and format validations including firmROEID format/date match, eventTimestamp precision and component validation, trade side detail mutual exclusions, BFMMFlag combinations, fulfillmentLinkType/firmDetails rules, representativeInd/aggregatedOrders logic, IMID format checks, quantity non-negativity, record max length (2132), MLOS supplement field combinations (2271), MLQS supplement field combinations (2272), destination Exchange ID validation (2019), exchOriginCode/destinationType bidirectional (2028), price required for LMT orders (2067), RFQID/RFQFlag bidirectional (2187/2257), NBBO field requirements (2048/2049/2051), openCloseIndicator/optionID (2057), DVPCustodianID/allocationType (2179), and more.
  • Multi-level undo/redo for filter and column operations

Sample Data

  • 1234_TEST_20250317_Sample_OrderEvents_000001.json — 84 records covering MEAA, MECO, MEFA, MEIM, MEIR, MENO, MENOS, MEOA, MEOC, MEOF, MEOFS, MEOM, MEOR, MEOT, MLNO, MLOR, MOCO, MONO, MOOF, and MOOT events, including equity and options fulfillment scenarios, a trade with side details that demonstrate order linkage in timelines and order chains, and same-timestamp event groups (in scrambled file order) that demonstrate origination-first ordering in the order chain view

Testing

Run the test suite with Node.js (v18+, no dependencies):

node --test tests/

Tests cover the order chain event ordering logic (origination events and their supplements sort ahead of other events sharing a timestamp) and sample data integrity, extracting the code under test directly from index.html.

Reference

Based on the CAT Reporting Technical Specifications for Industry Members v4.1.0 r15. See also: CAT Reference Data.

License

GPL-2.0

About

Consolidated Audit Trail (CAT) file viewer.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages