Getting Started • Architecture • Order Routing • Performance Benchmarks • API Reference • Exchange Connectors • Multi-Instrument
PinnacleMM is a high-performance, production-grade market making system designed for high-frequency trading in cryptocurrency markets. Built primarily in C++ with a focus on ultra-low latency, this system achieves microsecond-level execution speeds while maintaining robust risk management capabilities.
- Ultra-Low Latency Core: C++20 engine with lock-free data structures and nanosecond-precision timing
- Dynamic Market Making: Adaptive bid-ask spreads with intelligent inventory and position management
- Live Exchange Connectivity: Coinbase Pro WebSocket feeds and institutional FIX protocol support (Interactive Brokers, Coinbase, Kraken, Binance)
- Smart Order Routing: Multi-venue execution with BEST_PRICE, TWAP, VWAP, and MARKET_IMPACT algorithms
- ML-Enhanced Trading: Neural network spread optimization, Hidden Markov Model regime detection, market impact prediction, and reinforcement learning parameter adaptation
- Risk Management: Lock-free pre-trade checks, position/exposure limits, circuit breaker, real-time VaR, and a 16-type alerting system
- Multi-Instrument Trading: Simultaneous multi-symbol trading with cross-exchange arbitrage detection and cross-market correlation analysis
- Advanced Backtesting: Historical data replay with Monte Carlo analysis and A/B testing
- Observability: Real-time web dashboard (
--enable-visualization) and structured JSONL data export (--json-log) - Crash Recovery: Memory-mapped persistence with disaster recovery and backup tooling
- Enterprise Security: AES-256 encrypted credentials, input validation, audit logging, rate limiting, and certificate pinning
- Production Deployment: Docker images and a production-ready Kubernetes StatefulSet
PinnacleMM follows a modular, layered architecture:
- Core Engine Layer: Ultra-low latency components handling order book and execution
- Risk Layer: Pre-trade checks, circuit breaker, VaR engine, alerting, and disaster recovery
- Strategy Layer: Pluggable strategies for different market making approaches
- Exchange Layer: Multi-protocol connectivity (WebSocket, FIX) with simulation capabilities
- Persistence Layer: Memory-mapped file system for crash recovery
Read more about the system architecture.
- C++20 compatible compiler (GCC 10+, Clang 10+, or MSVC 2019+)
- CMake 3.14+
- Boost libraries 1.72+
- OpenSSL (secure credential handling)
- nlohmann_json (configuration handling)
- spdlog and fmt (auto-downloaded at pinned versions if not installed)
# Clone and setup
git clone https://github.com/chizy7/PinnacleMM.git
cd PinnacleMM
# Native execution (recommended for development) — auto-builds if needed
scripts/run-native.sh # Simulation mode
scripts/run-native.sh test # Run test suite
scripts/run-native.sh benchmark # Run performance benchmarks
# Docker execution (recommended for production)
scripts/run-docker.sh # Simulation modePre-built Docker images are available at ghcr.io/chizy7/pinnaclemm. See the Scripts Reference for all script commands, options, and container usage.
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON ..
make -j$(nproc || sysctl -n hw.ncpu)cd build && ./pinnaclemm --mode simulation --symbol BTC-USD
# With ML strategy and real-time dashboard
./pinnaclemm --mode simulation --enable-ml --enable-visualization# One-time credential setup (AES-256 encrypted, master password protected)
scripts/run-native.sh --setup-credentials
# Start live trading
cd build && ./pinnaclemm --mode live --exchange coinbase --symbol BTC-USD --verboseSee Security & API Key Management for credential details.
# Runs against historical data (auto-generates synthetic data if no CSV found)
cd build && ./pinnaclemm --mode backtest --symbol BTC-USDBacktest mode prints a detailed performance report (Sharpe ratio, drawdown, win rate) and saves JSON results. See the Advanced Backtesting Guide for custom data and parameters.
For all command-line options, run modes, multi-instrument setups, and the visualization dashboard, see the Getting Started Guide.
- Order Book Update Latency: <1 μs
- Order Execution Latency: <50 μs end-to-end
- Pre-Trade Risk Check: ~750 ns (lock-free)
- Circuit Breaker Check: ~5 ns (single atomic load)
- ML Prediction Latency: 1–3 μs (neural network inference)
- Throughput: 100,000+ messages per second
- Recovery Time: <5 seconds for full system recovery
- Memory Footprint: <100 MB for core engine
See Performance Benchmarks for methodology and full results.
- Risk Management — pre-trade checks, VaR, circuit breaker, alerting
- Disaster Recovery — operational runbook for crash recovery and backups
- Kubernetes Deployment — production K8s deployment guide
- Persistence System
- Security & API Key Management
- Certificate Pinning
- ML Spread Optimization
- Market Regime Detection
- Market Impact Prediction
- RL Parameter Adaptation
- Order Book Flow Analysis
- Advanced Backtesting
- Strategy Performance Visualization
- JSON Data Export
- Multi-Instrument Guide
- Cross-Exchange Arbitrage
- Cross-Market Correlation
- Performance Optimization Guide
- Core Engine: C++20, lock-free algorithms,
std::atomic - Build System: CMake
- Testing: Google Test, Google Benchmark
- Networking: Boost.Beast (WebSocket), hffix (FIX protocol)
- Machine Learning: Custom neural networks, Hidden Markov Models, reinforcement learning
- Visualization: HTML5/JavaScript frontend with Chart.js and D3.js
- Security: OpenSSL, AES-256-CBC encryption, PBKDF2 key derivation
- Configuration: nlohmann/json
- Deployment: Docker, Kubernetes
Contributions are welcome! Please read the Contributing Guide for development setup, coding standards, pre-commit hooks, and the pull request process. All participants are expected to follow our Code of Conduct.
- Bugs & feature requests: use the issue templates
- Security vulnerabilities: report privately via the Security Policy — never in a public issue
- Looking for ideas? Check the Roadmap
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, feedback, or collaboration opportunities:
- Email: chizy@chizyhub.com
- X (Twitter):