Skip to main content

pcapmbo

Decode raw exchange packet captures (pcap / pcap.zst) into standard market-by-order (MBO) events, with both the exchange timestamp and the capture timestamp. Rust core, Python API.

Status: pre-alpha. The package is set up but decodes nothing yet.

Why

Fast ITCH parsers and order book tools already exist, but they read ITCH day files, not network captures. The tools that do read captures are C++ programs with in-memory books or their own CSV output. Nothing gives you, from a pip install:

  • raw captures in: pcap / pcap.zst, with MoldUDP64 sequencing and gap reports
  • standard events out: the market-by-order (MBO) layout of the open DBN format, so the output works with existing tools as well as pandas, polars and Parquet
  • both clocks: ts_event (exchange time) and ts_recv (when the capture saw the packet)

Planned scope

v0.1: Nasdaq TotalView-ITCH 5.0 over MoldUDP64.

import pcapmbo

for batch in pcapmbo.read_pcap("capture.pcap.zst", feed="itch5", symbols=["NVDA"]):
    ...  # a pyarrow.RecordBatch of MBO events

This API is a plan, not code yet.

Later: IEX DEEP (free public captures), CME MDP 3.0, A/B line arbitration, an optional order book layer.

Out of scope: backtesting, fill simulation, live trading.

Market data

This repository contains code only. Never commit market data, licensed or otherwise: tests use synthetic captures or free public data. The .gitignore blocks common capture and data file types as a safety net.

Development

Needs Rust (stable) and Python 3.9 or newer.

python -m venv .venv && source .venv/bin/activate
pip install maturin pytest
cargo test                 # Rust tests
maturin develop            # build the extension into the venv
pytest                     # Python tests

Licence

Apache-2.0

Metadata

Release files for pcapmbo 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pcapmbo 0.0.0
File Size Uploaded Provenance Actions
pcapmbo-0.0.0.tar.gz 7.6 kB Without provenance Details for pcapmbo-0.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pcapmbo 0.0.0
File Actions
pcapmbo-0.0.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for pcapmbo-0.0.0-cp39-abi3-win_amd64.whl
pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_x86_64.whl
pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_aarch64.whl
pcapmbo-0.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for pcapmbo-0.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pcapmbo-0.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for pcapmbo-0.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
pcapmbo-0.0.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pcapmbo-0.0.0-cp39-abi3-macosx_11_0_arm64.whl
pcapmbo-0.0.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for pcapmbo-0.0.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 1.6 MB

Release files / pcapmbo-0.0.0.tar.gz

Download URL pcapmbo-0.0.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f3abb9a511156c59191e7bf5b1df5a7867a95142d678ea8aa21742ae9fad0ada
BLAKE2b-256 checksum
How to use checksums
6277e562b946fedd6ea9a371759882ad907c22e857b8a034d6a7c1d8c0de2b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-win_amd64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-win_amd64.whl
Size 90.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
59fbc21cd5bb8306612066e6d41ac210a031e3a00a686f9de5ba741bb7e44ff9
BLAKE2b-256 checksum
How to use checksums
99cc48f12a658c2f4151752ca68716dfa17e01394621edb7f2706f696b8b379c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 405.6 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
34a4bf0d65b762df4fb923caf09c131a088dae073a11df276e1f6597fc9a1fc1
BLAKE2b-256 checksum
How to use checksums
fc6dedaa3d58a948ef8b8e1a47dd5ad4d8436c4a5b97aa06c0dde93774ece68f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 373.9 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
8cef48dcd8547aabaea85a6e6bd780f866c97c02854ac0a68743069006e76b06
BLAKE2b-256 checksum
How to use checksums
49f1c7b7f43484f5b06009910cbfe9018779670aeae9390ce13ed7e010fb92c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 194.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3e55caaec80ea16812115b2fc3f4246d9860c3b4663b7d215cdef9c5c6f1d4bc
BLAKE2b-256 checksum
How to use checksums
2ba8690c2c99e938654082a5f477716bf377e0ead709497db8029a2f5374d6c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 195.8 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
5524bba00e102054e7ea5bc46dcef576f7a9032384b3b993ceddc424081e4265
BLAKE2b-256 checksum
How to use checksums
e242b1c7c5e71ec5a90a09984396236c35493b1c7210ff0afc28fad387806beb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-macosx_11_0_arm64.whl
Size 182.7 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
115cbb93b8caa2ed66e1f9ee28fa82dded34308509804a0d54ff2c79cbab7a51
BLAKE2b-256 checksum
How to use checksums
ef437bbcdf973cffae21fde9c4db40a43e16d3a13fb1747a66464a97f343b9f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pcapmbo-0.0.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pcapmbo-0.0.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 188.8 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b76e966514c9d79e56d7fdf813fa132285af4348e8abe1b970e6c10461f20237
BLAKE2b-256 checksum
How to use checksums
40c37173db857e4507b5f83542f320eb5dd972a111fa281c9b6e80f7d85431fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pcapmbo 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

8 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page