Skip to content

Getting Started

Prerequisites

  • Docker & Docker Compose — container runtime
  • Python 3.11+ — runtime for engine and dashboard
  • uv — fast Python package manager
  • just — command runner

Install on macOS

brew install just uv

Install on Linux

# Install just
bash scripts/install-just.sh

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

Environment Setup

Copy the example environment file and fill in your credentials:

cp .env.example .env

Key variables:

Variable Description
DATABASE_URL PostgreSQL connection string
BINANCE_API_KEY Binance API key (required for live trading)
BINANCE_API_SECRET Binance API secret
ENVIRONMENT dev or prod — controls storage backend
GRAFANA_ROOT_URL External Grafana URL (default: http://localhost:3000)

Local Development

1. Start Dev Databases

just setup
source .venv/bin/activate

This starts PostgreSQL and Redis via docker-compose.dev.yml, creates .venv, and installs all Python dependencies.

2. Seed Initial Data

just seed

Creates the default Tenant, Team, User, Assets, and Accounts. Idempotent — safe to run multiple times.

3. Run Database Migrations

just migration-run

4. Run the Dashboard API

just dashboard

FastAPI runs at http://localhost:8000. Swagger UI at http://localhost:8000/docs.

5. Run the Trading Engine

just nt

Starts the NautilusTrader node with 5 strategies and DatabaseActor. Requires .env with exchange credentials.

Observability Stack

just obs-up

Open Grafana at http://localhost:3000 (credentials: admin / admin)
→ Dashboards → NautilusTrader Latency (Mimir)

just obs-down   # stop the stack

Production

just prod-up    # start full system (obs stack + trader container)
just prod-down  # stop everything