C++20 toolkit for loading, diffing, and reporting order-entry protocol schema changes across Nasdaq OUCH and NYSE Pillar Binary.
Working prototype.
The repository currently includes a tested vertical slice of the protocol-migration workflow:
- vendor-first schema extraction in YAML
- C++20 schema loader for catalogs and per-message definitions
- structural message diff engine
- human-readable message diff reports
- automated test coverage for loader, diff, and report layers
Current test status: 26/26 passing.
Protocol upgrades are often handled with manual PDF review, ad hoc edits, and one-off tests. This project turns that process into a repeatable workflow:
vendor schema -> parser -> diff -> report -> tests
The goal is to build tooling that helps answer practical migration questions:
- What changed between protocol versions?
- Which fields were added, removed, or changed?
- Which messages exist only in one version?
- How can migration checks be made repeatable?
This repository is focused on order-entry protocol evolution.
In scope at the source layer:
- Nasdaq OUCH 4.2
- Nasdaq OUCH 5.0
- NYSE Pillar Gateway Binary Protocol Specification
- NYSE Pillar Options Gateway Binary Protocol Specification
The implementation is currently deepest on the OUCH 4.2 vs 5.0 path.
The repository stores vendor-derived YAML catalogs and message definitions under specs/vendor/....
This layer is intentionally vendor-first:
- vendor message names are preserved inside YAML
- field order, offsets, lengths, and enums are kept close to the source specs
- normalization is deferred to code, not hard-coded into the schema files
The loader parses:
- protocol message catalogs
- individual vendor message YAML files
Implemented in:
include/vendor_schema.hppsrc/vendor_schema_loader.cpp
The current diff engine performs structural comparison between two loaded messages.
It currently detects:
- added fields
- removed fields
- offset changes
- length changes
- wire type changes
- requiredness changes
Implemented in:
include/diff.hppsrc/diff.cpp
The report layer renders a readable message-diff summary from the structural diff result.
Implemented in:
include/report.hppsrc/report.cpp
The repository includes passing tests for:
- catalog loading
- message loading
- error handling in the loader
- first structural diff scenarios
- report formatting
Current tested OUCH message coverage includes:
- Enter Order
- Replace Order
- Cancel Order
- Modify Order
- Mass Cancel (5.0-only)
The NYSE side currently has tested catalog loading in place and is ready for deeper message-level expansion later.
A current message diff report looks like this in spirit:
Message diff: Enter Order Message -> Enter Order
- Removed field: Order Token
- Removed field: Buy/Sell Indicator
- Added field: UserRefNum
- Added field: Side
- Added field: ClOrdID
- Added field: Appendage Length
- Added field: Optional Appendage
- Length changed: Price (length changed from '4' to '8')
Example Ubuntu / WSL packages:
sudo apt update
sudo apt install -y \
build-essential \
cmake \
gdb \
git \
ninja-build \
pkg-config \
libyaml-cpp-dev \
libgtest-devcmake -S . -B build
cmake --build buildctest --test-dir build --output-on-failureThe repository currently prioritizes traceable extraction over aggressive normalization.
The project is being built through narrow, testable milestones rather than broad incomplete coverage.
That is why the repository currently has:
- deeper support for a few comparable OUCH messages
- lighter support for the broader NYSE source layer
This is not finished migration tooling yet.
Not implemented yet:
- catalog-level version diff
- semantic rename detection
- compatibility classification
- generated regression / negative tests
- benchmark harness
- CI artifact publishing
- full locked-template coverage
- catalog-level diff between protocol versions
- compatibility classification
- full OUCH 4.2 vs 5.0 migration report
- broader message-template coverage
- generated validation artifacts
- benchmark path