Automated IB + Claude AI trading bot for EU/US markets
  • Python 97.4%
  • Shell 2.6%
Find a file
forge 9cab0cbd0a feat: expand test coverage and refine core trading modules
Adds test_main, test_manual_trigger, test_market_data, and manual_trigger
module; extends executor, risk, signal, monitor, backtest, and trade_log
tests; refines main loop, dashboard, runtime config, and systemd service.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:04:41 +02:00
dashboard feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
scripts feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
systemd feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
tests feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
trader feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
.env.example Initial commit: IB + Claude AI trading bot 2026-04-17 11:10:23 +02:00
.gitignore Initial commit: IB + Claude AI trading bot 2026-04-17 11:10:23 +02:00
README.md Initial commit: IB + Claude AI trading bot 2026-04-17 11:10:23 +02:00
requirements.txt feat: expand test coverage and refine core trading modules 2026-04-21 00:04:41 +02:00
sync.sh Initial commit: IB + Claude AI trading bot 2026-04-17 11:10:23 +02:00

trader

Automated trading bot for EU and US markets (ETFs + stocks) using Interactive Brokers Gateway and Claude AI for signal generation.

Stack

  • IB Gateway — order execution via ib_insync
  • Claude Haiku — AI signal generation
  • Streamlit — web dashboard
  • signal-cli-rest-api — Signal messenger alerts

Requirements

  • Python 3.11+
  • IB Gateway running (paper: port 4002, live: port 4001)
  • signal-cli-rest-api container (optional, for alerts)

Setup

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API keys and IB connection details

# Run bot
python -m trader.main

# Run dashboard (separate terminal)
streamlit run dashboard/app.py

Systemd (LXC deployment)

cp systemd/*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now trader dashboard

Tests

pytest tests/ -v

Backtest

python scripts/run_backtest.py --symbols SPY QQQ VWCE --years 3

Markets

Market Schedule (CET) Symbols
EU 09:35 17:20 VWCE, EXS1, XDWD (XETR)
US 15:35 21:50 SPY, QQQ, AAPL, … (NYSE/NASDAQ)

Risk controls

  • Daily loss limit: 2% equity
  • Weekly loss limit: 5% equity
  • Max open positions: 5
  • VIX halt: ≥ 40 — circuit breaker: SPY 2.5% intraday