Skip to content

lkevincc0/TradingGYM

Repository files navigation

TradingGYM

CI Rust Python

An ultra-low-latency High-Frequency Trading (HFT) matching engine built in Rust with Python (PyO3) bindings. Features zero-allocation hot paths (O(1) cancellation, 182ns matching), a realistic Gymnasium RL environment for training market-making agents, and a live terminal L2 orderbook dashboard.

Quick Start

# run rust tests
cargo test --lib
cargo test --tests

# setup python
python3 -m venv .venv && source .venv/bin/activate
pip install maturin pytest
maturin develop

# run python tests
pytest tests/ -v

# run example
python example/basic_usage.py

# live dashboard
python -m matching_enegine.dashboard

# rl example
python example/rl_training/train_ppo.py
python example/rl_training/train_grpo.py

About

matching engine + rl practice

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors