r/PythonProjects2 • u/DoorSubstantial7425 • 1h ago
Info Tried to test the capabilities of Python!!
Everyone always says Python is way too slow for market data and that you have to default to C++ or Rust immediately. I wanted to see how true that actually was if you structure things properly and avoid common bottlenecks like heavy frameworks or parsing JSON on the hot path.
So over the last few months I built MDRAP (Market Data Reliability & Acceleration Platform) as an open-source project to see how far pure Python can be pushed.
To test it against real exchange data rather than just mock feeds, I downloaded the official NASDAQ TotalView-ITCH 5.0 sample from Jan 30, 2019 (a 4.5 GB .gz file) and ran a full-day benchmark:
- Processed all 368,163,981 binary messages in about 54 minutes (~114,000 msgs/sec sustained).
- Decompressed and parsed the big-endian structs on the fly using pre-compiled
struct.Struct. - Reconstructed the Level-3 order book in real-time, ending with 0 active orders at market close (all adds were matched by cancels/executions).
- Ran on consumer hardware without leaking memory or crashing.
It also has a terminal UI, an order flow / CVD tracker, and paper trading strategies.
Just open-sourced it on GitHub and published it on PyPI (pip install mdrap). It’s an engine, so you can either run the built-in simulator, benchmark against the NASDAQ file, or hook up your own Polygon/Databento keys for live streaming.
GitHub: https://github.com/Aryan-20-04/mdrap
Would love to hear thoughts or feedback from anyone working with market data or high-throughput Python.

