A high-performance trade simulator leveraging real-time market data to estimate transaction costs and market impact for cryptocurrency exchanges.
- Real-time L2 orderbook data processing via WebSocket
- Market impact calculation using Almgren-Chriss model
- Slippage estimation using regression modeling
- Fee calculation based on exchange documentation
- Maker/Taker proportion prediction
- Performance metrics including internal latency
-
Install the required dependencies:
pip install -r requirements.txt -
Run the application:
python src/main.py
- Python 3.8+
- Libraries specified in requirements.txt
- Internet connection to access WebSocket endpoints
- VPN for accessing OKX (as market data is restricted in some regions)
- Each module includes docstrings explaining its functionality
- Detailed documentation is available in the
docsdirectory:
The application includes various optimizations:
- Efficient data structures for orderbook processing
- Multi-threading for UI and data processing
- Optimized regression model implementations
- Memory management techniques
- Exchange (OKX)
- Spot Asset (Any available on the selected exchange)
- Order Type (market)
- Quantity (~100 USD equivalent)
- Volatility (market parameter)
- Fee Tier (based on exchange documentation)
- Expected Slippage
- Expected Fees
- Expected Market Impact
- Net Cost
- Maker/Taker proportion
- Internal Latency