# alpaca-llm-bot-v1 Autonomous LLM trading system (paper-first) powered by: - Alpaca trading API - Ollama local model inference - Searx web data ingestion - FastAPI dark dashboard - APScheduler autonomous loops ## Autonomous behavior - Curates market/news context every `CURATE_INTERVAL_MINUTES` (default 30) - Runs trade decision cycle every `TRADE_INTERVAL_HOURS` (default 2) - LLM decides buy/sell/hold per symbol - Executes only if confidence >= `MIN_CONFIDENCE` - Hard risk caps: - max `$5` order notional (default) - max daily notional cap - max open positions cap - market-open gate ## Quick start ```bash cp .env.example .env # fill ALPACA_API_KEY / ALPACA_API_SECRET python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt uvicorn app:app --host 0.0.0.0 --port 8089 ``` Dashboard: - `http://:8089/` Manual triggers: ```bash curl -X POST http://127.0.0.1:8089/curate-now curl -X POST http://127.0.0.1:8089/run-now ``` ## Production service (systemd) ```bash sudo cp systemd/alpaca-llm-bot-v1.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now alpaca-llm-bot-v1 sudo systemctl status alpaca-llm-bot-v1 ``` ## Important - Keep `PAPER_MODE=true` until you observe stable behavior. - This is experimental and not financial advice.