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: Optimized C++ engine with lock-free data structures
- Nanosecond Precision: High-resolution timing for accurate execution
- Crash Recovery: Memory-mapped persistence system for reliable operation
- Dynamic Market Making: Adaptive bid-ask spread based on market conditions
- Position Management: Intelligent inventory management with customizable risk parameters
- Exchange Simulation: Realistic market simulation for strategy development and testing
- Live Exchange Connectivity: Connect to major cryptocurrency exchanges
- Secure API Credentials: Encrypted storage for exchange API keys
- Comprehensive Testing: Extensive test suite ensuring reliability and performance
PinnacleMM follows a modular, layered architecture:
- Core Engine Layer: Ultra-low latency components handling order book and execution
- Strategy Layer: Pluggable strategies for different market making approaches
- Exchange Layer: Connectivity to exchanges with simulation capabilities
- Persistence Layer: Memory-mapped file system for crash recovery
Read more about the system architecture.
PinnacleMM is being developed in phases:
- ✅ Phase 1 (Completed): Core engine, basic strategy, and simulation
- 🔄 Phase 2 (In Progress): Latency optimization and exchange connectivity
- ℹ️ DPDK Integration: Ultra-low latency networking (Deferred - requires specialized hardware)
- 🔲 Phase 3: Advanced strategies and machine learning integration
- 🔲 Phase 4: Risk management and production deployment
See the detailed project roadmap for more information.
- C++20 compatible compiler (GCC 10+, Clang 10+, or MSVC 2019+)
- CMake 3.14+
- Boost libraries 1.72+
- spdlog library (for structured logging)
- fmt library (for formatting, spdlog dependency)
- OpenSSL library (for secure credential handling)
- nlohmann_json library (for configuration handling)
# Clone the repository
git clone https://github.com/chizy7/PinnacleMM.git
cd PinnacleMM
# Create build directory
mkdir build && cd build
# Configure with CMake
cmake ..
# Build the project
# For macOS:
make -j$(sysctl -n hw.ncpu)
# For Linux:
# make -j$(nproc) # Use appropriate core count for your machine
# Run in simulation mode
./pinnaclemm --mode simulation --symbol BTC-USD
# Run with a live exchange
./pinnaclemm --mode live --exchange coinbase --symbol BTC-USD
When running in live mode, you'll be prompted for your master password to decrypt API credentials.
PinnacleMM securely stores and manages exchange API credentials:
- Encryption: AES-256-GCM encryption for all sensitive data
- Master Password: Single password to unlock all exchange credentials
- Secure Storage: Credentials are never stored in plaintext
- Configuration: API keys are configured via a secure interface
- Create a credentials file:
./pinnaclemm --setup-credentials
- Enter your master password when prompted
- Add your exchange API keys through the interactive prompt
For more detailed instructions, see the Getting Started Guide.
# Build the Docker image
docker build -t pinnaclemm .
# Run the container
docker run -d --name pinnaclemm pinnaclemm
- Order Book Engine: Ultra-fast matching engine with lock-free operations
- Market Making Strategy: Adaptive pricing based on market conditions
- Persistence System: Crash recovery with memory-mapped files
- Exchange Simulator: Realistic market simulation for testing
- System Architecture
- Persistence System
- API Reference
- Getting Started Guide
- Recovery Guide
- Security & API Key Management
- Project Roadmap
- Core Engine: C++20
- Build System: CMake
- Testing: Google Test
- Performance Benchmarking: Google Benchmark
- Concurrency: Lock-free algorithms, std::atomic
- Security: OpenSSL for encryption
- Configuration: nlohmann/json
- Containerization: Docker
PinnacleMM achieves exceptional performance metrics:
- Order Book Update Latency: <1 μs (microsecond)
- Order Execution Latency: <50 μs (end-to-end)
- Throughput: 100,000+ messages per second
- Recovery Time: <5 seconds for full system recovery
- Memory Footprint: <100 MB for core engine
- ✅ Lock-free data structures implemented for ultra-low latency
- ✅ Memory-mapped persistence system with crash recovery capabilities
- 🔄 Next: Implementing exchange connectivity and WebSocket integration
This project is licensed under the MIT License - see the LICENSE file for details.