Omi C# Protocols
August 11, 2026 · View on GitHub
Omi C# Protocols provide source generated C# parsing of common binary exchange protocols. Each parser flavor is a self-contained top-level directory holding one slice per protocol version.
- Classes — Classes parser — immutable classes with Parse methods, built for readability over raw throughput.
- ZeroCopy — Zero-copy sequential-layout parser — [StructLayout(LayoutKind.Sequential, Pack = 1)] unsafe structs overlaying packet bytes directly, no parsing loop.
Usage
Each protocol directory is a self-contained slice with its own solution and NuGet packaging:
dotnet build Classes/Iex/IexEquities/Tops.IexTp.v1.56/Iex.IexEquities.Tops.IexTp.v1.56.slnx
Each slice ships a pcap-driven Test harness that walks a whole capture (frame → payload → parse → counts). Captures are not included in this repository — point a harness at a local pcap:
dotnet run --project <flavor>/<organization>/<division>/<protocol>/Test -- <path-to-pcap>
Every flavor directory carries its own Pcap.CSharp project providing pcap traversal for its harnesses.
Development
Updates are greatly appreciated; however, this entire repository is source generated...including the words you are reading right now. If you wish to suggest parser updates, the recommended process is to create an issue with changes and explanation. Time permitting, we will update the models and regenerate.
| Protocol Count | Generated Lines |
|---|---|
| 14 | 120,597 |
Testing
Please report any parsing errors as an issue. Include a small note on the protocol and version, and a minimal capture demonstrating the problem. Also consider including a link or pdf specification documenting the correct behavior.
Production packet captures are required for protocol verification. If your organization has the rights to packet captures, and you wish to make the world a better place, please post captures to this project.
Open Markets Initiative
The Open Markets Initiative (Omi) is a group of technologists dedicated to enhancing the stability of electronic financial markets using modern development methods.
For a list of Omi Hft projects: Omi Projects
For details of Omi rules and regulations: Omi Directory
Protocols
Parsers by Organization: Iex
Parsers by Exchange: IexEquities
Disclaimer
Any similarities between existing people, places and/or protocols is purely incidental.
Enjoy.