Automated trading system for Binance spot markets. Built for a single developer to operate, maintain, and extend.
Two services. One synchronous call stack from candle to order.
data-ingest ──► strategy-executor ──► Binance
│ │
└─────── TimescaleDB ──────────────── Redis
Full architecture: docs/architecture.md
# 1. Install local package (dev mode)
make install
# 2. Copy and fill in environment variables
cp .env.example .env
# Edit .env — set BINANCE_API_KEY, DB_PASSWORD, etc.
# 3. Start infrastructure + services
make up
# 4. Initialize database
make db-init
# 5. Check everything is running
make ps
make healthmake test # run all tests
make test-unit # unit tests only
make lint # ruff linter
make typecheck # mypymake logs # tail all logs
make logs-executor # tail strategy-executor only
make deploy # git-tagged rolling deploy
make db-backup # backup to BACKUP_DESTINATIONSee docs/runbook.md for incident response procedures.
| Phase | What you build |
|---|---|
| 0 | Config, exchange client, docs |
| 1 | data-ingest service, DB layer |
| 2 | Indicators, backtest engine |
| 3 | strategy-executor (full), risk layer, safety |
| 4 | Production hardening, monitoring |
| 5+ | Enrichment, ML (gated — see runbook) |
autotrade/ Python package (shared library)
services/ Deployable services (2 for Phase 1-3)
config/ One YAML file per environment
infra/ Docker, Grafana, Prometheus, scripts
backtest/ Offline simulation engine
tests/ Unit, integration, E2E
docs/ Architecture, runbook, decisions
ml/ ML pipeline (Phase 5+ only — see gate conditions)