Automated trading bot for Polymarket's BTC 5-minute up/down markets, written in Rust. It streams BTC prices from Binance and live orderbooks from Polymarket, scores momentum signals, applies risk limits (daily loss limit, consecutive-loss halt, emergency stop), and places orders, or simulates them in dry-run mode. A built-in REST/WebSocket API and dashboard run on port 8080.
Prerequisites: Rust (stable, via rustup), plus pkg-config and OpenSSL dev headers on Linux.
cp config.example.json config.json
# create .env:
# DRY_RUN=true
# ENABLE_REAL_TRADING=false
# PRIVATE_KEY=0x... # only for live trading
# DATABASE_URL=sqlite:./data/trader.db # optional
# LOG_LEVEL=info LOG_DIR=./logs # optional
cargo run --release
cargo testLive trading requires DRY_RUN=false, ENABLE_REAL_TRADING=true and PRIVATE_KEY together. Real money is at risk.
Docker: docker compose up
License: MIT