Low-latency trading engine with a C++ market-data pipeline and a live web UI.
- C++ limit-order-book core with pluggable strategies
- C++ websocket ingest and normalization pipeline (OKX over TLS)
- Bridge ingress into the C++ engine (Unix socket IPC)
- Optional WebSocket server + dashboard
- CMake 3.16+
- C++20 compiler (GCC/Clang)
- OpenSSL + zlib (for the C++ market-data pipeline WebSocket client)
- Node.js 18+ (optional, for local web dashboard development)
Linux/macOS is recommended because the engine/pipeline bridge uses Unix-domain sockets.
Live UI: Order Book, Trade Flow, Latency Metrics, and Strategy Signals.
- Build:
cmake -S . -B build cmake --build build - Terminal A: start the engine (WebUI mode):
./build/quantumflow \ --symbols BTC-USDT-SWAP,ETH-USDT-SWAP \ --ws-port 9001 \ --bridge-socket /tmp/quantumflow_bridge.sock \ --pipeline-control-socket /tmp/quantumflow_pipeline_ctrl.sock
- Terminal B: start the C++ market-data pipeline and push into the C++ engine:
./build/quantumflow_pipeline \ --symbols BTC-USDT-SWAP,ETH-USDT-SWAP \ --channels books5,trades \ --cpp-bridge \ --bridge-socket /tmp/quantumflow_bridge.sock \ --control-socket /tmp/quantumflow_pipeline_ctrl.sock
- Terminal C (optional): run the React dashboard:
Then open
cd web npm install npm run devhttp://localhost:5173(the app connects tows://localhost:9001).
- Start
quantumflowfirst. - Start the C++ pipeline (
quantumflow_pipeline) with--cpp-bridge. - View metrics/order book/trades in the web app.
- Use the symbol selector in the UI to request runtime symbol changes (sent through the control socket).
./build/quantumflow --headless --symbols BTC-USDT-SWAP,ETH-USDT-SWAPThis keeps the strategy/LOB engine running without the WebSocket broadcast/UI loop.
make build # Configure + build C++ engine
make run-engine # Run engine (WebUI mode + bridge sockets)
make pipeline-run # Build + run the C++ pipeline with --cpp-bridge
make web # Start web dashboard dev server
make test # Run C++ tests
make headless # Build headless configuration--symbols BTC-USDT-SWAP,ETH-USDT-SWAPcomma-separated instruments--headlessdisable WebUI broadcasting--ws-port 9001WebSocket server port for UI clients--bridge-socket /tmp/quantumflow_bridge.sockpipeline->C++ ingress socket--pipeline-control-socket /tmp/quantumflow_pipeline_ctrl.sockruntime symbol control socket
For C/C++ editor diagnostics (for example in VS Code), this repo uses
compile_commands.json at the project root (symlink to build/compile_commands.json).
If you see include-path squiggles, regenerate it by reconfiguring:
make configurequantumflow/
├── main.cpp # C++ engine entrypoint
├── CMakeLists.txt # Build configuration
├── Makefile # Common dev/build/run commands
├── bridge/ # Shared-memory IPC helpers for the engine
├── common/ # Shared C++ data models/utilities
├── orderbook/ # Limit order book core + tests/bench
├── pipeline/ # C++ market-data ingest/normalize/sinks
├── strategies/ # Strategy interfaces + implementations
├── ws/ # C++ WebSocket server + JSON serializers
├── web/ # React/Tailwind dashboard
├── tests/ # C++ unit tests (engine/bridge/strategies)
├── third_party/ # Dependency setup via CMake FetchContent
├── graphics/
│ └── include/memory/allocator.h # Shared allocator utilities
└── screenshot/ # README/UI assets