You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Production-minded AI trading stack: strategy proposes, policy approves, execution fills, and portfolio reconciles. This repo includes autonomous orchestration, approvals, notifications, sentiment, audit logging, and dashboard controls on top of the core trading services.
Create an API key pair — copy the public key and user key
Set ETORO_API_KEY and ETORO_USER_KEY in your .env
Keep ETORO_DEMO=true until you are ready for live trading
Running in Demo Mode
cp .env.example .env
# Edit .env — at minimum set ANTHROPIC_API_KEY and ETORO_API_KEY/USER_KEY# Leave ETORO_DEMO=true and BROKER=paper (or etoro with demo=true)# Install dependencies
uv sync
# Start all services (each in its own terminal or use a process manager)
uv run uvicorn policy_service.main:app --port 8001
uv run uvicorn execution_service.main:app --port 8002
uv run uvicorn strategy_service.main:app --port 8003
uv run uvicorn portfolio_service.main:app --port 8004
uv run uvicorn research_service.main:app --port 8005
uv run uvicorn audit_logger.main:app --port 8006
uv run uvicorn autonomy_orchestrator.main:app --port 8007
uv run uvicorn sentiment_aggregator.main:app --port 8008
uv run uvicorn notification_service.main:app --port 8009
uv run uvicorn approval_gateway.main:app --port 8010
# Open dashboard
open apps/dashboard/index.html
Enabling Live Mode (Step-by-Step)
⚠️ Only proceed after at least 30 days of demo/paper trading with no policy violations.
Set ETORO_DEMO=false and BROKER=etoro in .env
Set ADMIN_API_KEY to a strong random secret in .env
Restart all services
Verify kill switch is OFF in the dashboard
Set weekly cap in config/policy-baseline.yaml (weekly_notional_cap_usd)
Call the live-mode endpoint with admin credentials:
curl -X POST http://localhost:8007/v1/orchestrator/live-mode \
-H "X-Internal-Key: $INTERNAL_API_KEY" \
-H "X-Admin-Key: $ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enable": true, "confirmation": "I CONFIRM LIVE TRADING"}'
Monitor the first 10 trades manually via the dashboard
Running Tests
uv run pytest tests/ -x -q --ignore=tests/integration
About
Production-minded AI trading stack with deterministic execution, fill-driven portfolio reconciliation, and AAHP-based AI handoffs.