Skip to content
Maxime Grenu edited this page Feb 18, 2026 · 1 revision

Setup

Requirements

  • Python 3.10+
  • Git
  • Docker (optional, for Grafana/Prometheus stack)
  • HashiCorp Vault (for secrets management)
  • Binance account (testnet for paper trading — no real funds needed)

Installation

1. Clone the repository

git clone https://github.com/cluster2600/ELVIS.git
cd ELVIS

2. Create a virtual environment

python3 -m venv .venv
source .venv/bin/activate   # On Windows: .venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Configure secrets

Option A: HashiCorp Vault (recommended)

# Install Vault
brew install vault   # macOS
# or: https://developer.hashicorp.com/vault/install

# Start Vault in dev mode (local development)
vault server -dev &
export VAULT_ADDR='http://127.0.0.1:8200'
export VAULT_TOKEN=<dev-root-token-printed-above>

# Store your Binance testnet API keys
vault kv put secrets/binance \
  api_key="YOUR_TESTNET_API_KEY" \
  secret="YOUR_TESTNET_SECRET"

# Store Telegram credentials (optional)
vault kv put secrets/telegram \
  bot_token="YOUR_BOT_TOKEN" \
  chat_id="YOUR_CHAT_ID"

Option B: .env file (development only — never commit)

cp .env.example .env
# Edit .env:
# BINANCE_TESTNET_API_KEY=...
# BINANCE_TESTNET_SECRET=...
# TELEGRAM_BOT_TOKEN=...  (optional)

5. Get Binance Testnet API Keys

  1. Go to https://testnet.binance.vision/
  2. Log in with GitHub
  3. Generate API key + secret
  4. Add to Vault or .env as above

6. Configure the bot

# Copy and edit the config
cp config/config.example.yaml config/config.yaml

Key settings in config/config.yaml:

trading:
  mode: paper           # Always use 'paper' — never 'live' without full review
  symbol: BTC/USDT
  timeframe: 1h

risk:
  max_position_size: 0.10
  max_drawdown_pct: 0.05
  stop_loss_pct: 0.02

Running the Bot

# Start paper trading (default mode)
python main.py --mode paper

# With console dashboard
python main.py --mode paper --dashboard

# Run a backtest
python main.py --mode backtest --start 2024-01-01 --end 2024-12-31

Optional: Monitoring Stack (Docker)

# Start Prometheus + Grafana
docker compose -f deployments/monitoring/docker-compose.yml up -d

# Access Grafana
open http://localhost:3000
# Default login: admin / admin

Verify Installation

# Run unit tests
python -m pytest tests/ -v

# Quick sanity check (no live data needed)
python main.py --mode backtest --start 2024-01-01 --end 2024-01-07 --silent

Troubleshooting

Problem Solution
ModuleNotFoundError Run pip install -r requirements.txt inside your venv
Vault connection error Check VAULT_ADDR and VAULT_TOKEN are set; run vault status
Binance API error Verify testnet keys in Vault; check IP allowlist in Binance settings
No data Check internet connection; try python main.py --fetch-only

Updating

git pull origin main
pip install -r requirements.txt   # Re-run if requirements changed

Clone this wiki locally