- Rust 1.75.0+ (install via rustup)
- Python 3.12 or 3.13 (not 3.14+; PyO3 0.21 in
rust_engine/Cargo.tomldoes not support Python 3.14) - Poetry
git clone --recursive https://github.com/alihaskar/gap-mm
cd gap-mm
poetry install --with dev
cd rust_engine && poetry run maturin develop --release && cd ..# All Python tests
poetry run pytest tests/ -v
# Specific suite
poetry run pytest tests/unit/ -v
poetry run pytest tests/integration/ -v
# Rust unit tests (includes bybit.rs gap-probability tests)
cd rust_engine && cargo test# Python
poetry run ruff check src/ tests/
poetry run ruff format src/ tests/
# Rust
cd rust_engine
cargo fmt
cargo clippy -- -D warningsAlways rebuild before running Python:
cd rust_engine && poetry run maturin develop --release && cd ..Use conventional commits:
feat: add ETH/USDT tick-size preset
fix: correct gap scan off-by-one on bid side
docs: update README architecture diagram
test: add edge case for zero liquidity in gap
- Fork, create a feature branch off
main. - Keep changes focused — one concern per PR.
- Ensure
pytestandcargo testpass cleanly. - Ensure
ruff checkandcargo clippyproduce no errors. - Update the relevant section of
CHANGELOG.md.