Skip to content

Repository files navigation

Autotrade

Automated trading system for Binance spot markets. Built for a single developer to operate, maintain, and extend.

Architecture

Two services. One synchronous call stack from candle to order.

data-ingest  ──►  strategy-executor  ──►  Binance
     │                   │
     └─────── TimescaleDB ──────────────── Redis

Full architecture: docs/architecture.md

Quick Start

# 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 health

Development

make test          # run all tests
make test-unit     # unit tests only
make lint          # ruff linter
make typecheck     # mypy

Operations

make logs          # tail all logs
make logs-executor # tail strategy-executor only
make deploy        # git-tagged rolling deploy
make db-backup     # backup to BACKUP_DESTINATION

See docs/runbook.md for incident response procedures.

Phase Map

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)

Project Layout

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)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages