Architecture: batch + executor split.
- bt-1 (
ssh bt-1,/root/hl-backtest/) computes signals viauk_v106_combo_fstrategy on bar-close cron jobs (us_1d, us_8h, fut_1d) and writes signal JSON files to/var/lib/uk-bot/signals/. - ib-bot (
ssh ib-bot,/home/ubuntu/ib_v105_bot/) rsyncs signals every 2 min, executes IB orders (STOP-LIMIT + bracket SL/TP), manages positions (50/50 partial TP, 8-bar pivot trail), and reconciles state.
Why split: IB market-data caps (1100 max lines) cannot stream the 962-symbol universe; IB historical pacing (60 req/10 min) cannot refresh universe inside one cycle. bt-1 already has the data + strategy pipeline; ib-bot is a thin executor.
| Dir | Contents |
|---|---|
bot/ |
Core modules (config, exchange_ib, signal_reader, state_manager, order_router, trader, reconciler, kill_switch, main, universe, journal, data_source, sessions) |
scripts/ |
Operational scripts (universe build, signal puller, dry-run, parity test, healthcheck) |
systemd/ |
systemd units (bot service, reconciler timer, signal puller timer) |
tests/ |
pytest suite |
data/ |
runtime data: trades.db, signals_inbox/, signals_processed/ |
docs/ |
runbook.md |
- Copy
.env.paper.example→.env, fill credentials pip install -r requirements.txtpython -m pytest tests/python scripts/healthcheck.py(must exit 0)python scripts/dry_run_signal_replay.py --signals tests/fixtures/sample_us_1d.jsonto verify the pipeline end-to-end- systemd install: see
docs/runbook.md
- Plan file:
/Users/ak/.claude/plans/bright-wishing-rocket.md - Strategy spec memory:
project_ib_v105_deploy_final_2026_05_24 - IB technical limits research: in plan file section "IB Technical Constraints"