/invest:invest-ibkrfrom invest
Operator notes for openInvest's experimental IBKR live autopilot: LLM picks and trades US stocks/ETFs via Interactive Brokers with no human confirmation per trade. Use only for status, orders, fills, news, gateway login, or IB Key approval.
Ships in invest. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
⚠️ BETA — do not use. This drives real money in a real brokerage account with no per-trade human confirmation. It exists for one operator's own experiment. There is no support and no guarantee, it can lose money, and every switch defaults to off. If you are not that operator, stop reading and use the
investskill.
Full reference: docs/wiki/24-ibkr-autopilot.md in the openInvest repo. This page is the short operator card.
openinvest ibkr_autopilot … (job jobs/ibkr_autopilot.py) runs against a separate INVEST_HOME whose
target_assets are the US tickers held at Interactive Brokers. The production hub and every fork stay untouched:
ibkr.enabled=false and ibkr.dry_run=true by default, and the ibkr.* keys are deliberately not settable
through config / MCP / the web API (only INVEST_IBKR_* env or that home's memory/.state/config_overrides.json).ib_async). IBKR's OAuth 1.0a Web API is institutional-only,
so individual accounts cannot run fully headless: the account holder approves an IB Key push on their phone
about once a week.Safe to run in conversation (read-only):
| Command | What |
|---|---|
ibkr_autopilot status | Broker cash / positions / open orders / today's fills + local ledger + list + today's orders + halt flag |
ibkr_autopilot brief [--kind pick] | The full decision context (rules, account, list, committee verdicts, IBKR news headlines) |
ibkr_autopilot news [--symbols A,B] [--days N] / --article PROVIDER:ID | IBKR's free news (Briefing.com, Dow Jones) — untrusted external text |
ibkr_autopilot news_check | New headlines for the list + holdings since the last check (marks them seen; cron use) |
ibkr_autopilot committee | No orders: runs the 4-role committee report + verdict_review (minutes, spends LLM credits) |
Move real money when ibkr.enabled is on and ibkr.dry_run is off — never run these in conversation:
| Command | What |
|---|---|
ibkr_autopilot pick --picks-file F / decide --orders-file F [--batch 1-4] | Submit a list / today's orders as JSON (validated: list members only, BUY/SELL, positive amounts) |
ibkr_autopilot submit [--batch N] | DAY limit orders at reference ±1%; buying power = IBKR AvailableFunds (a cash account auto-converts the base currency, commission-free — there is no FX command) |
ibkr_autopilot reconcile | Books fills (stocks + IBKR's auto-FX legs) idempotently, broker-confirmed negative cash allowed; halts with a STOP file on position drift |
ibkr_autopilot daily | Full LLM pipeline: pick → committee → decide → submit |
Instead of per-run LLM calls, a long-lived Claude Code session (tmux, Remote Control) can own the decisions: it reads
brief, writes JSON to a file and runs pick --picks-file F / decide --orders-file F --batch N + submit --batch N
(same validation as the LLM path). System cron only pings it with one-line messages (new headlines, after-close
reconcile); its rules live in that home's own CLAUDE.md, not in this skill.
Enforced in code regardless of what the LLM writes: account number must match the gateway login; a STOP file
blocks all orders; only list members are bought; limit orders only; sells never exceed the broker position (cash
account: no margin, no shorting); at most 4 order batches a day; only explicit gateway acks count as placed; news
is labelled untrusted. Per-order / per-day USD caps exist (ibkr.max_order_usd / max_day_usd) — an operator may
raise them for their own home, which removes that brake.
INVEST_HOME, base currency USD, ibkr.enabled=true, ibkr.account=U…; keep dry_run true at first.gnzsnz/ib-gateway, TRADING_MODE=live, API bound to 127.0.0.1:4001,
BYPASS_WARNING=no). The 2FA device must be IBKR Mobile's IB Key (TWOFA_DEVICE="IB Key"): Passkey and the
Mobile Authenticator app cannot be completed by a headless gateway.status, then a dry-run submit and read the whatIfOrder results before turning dry_run off.$LEDGER-CashBalance rather than CashBalance (both are read).STOP and needs a manual ledger fix.ibkr.notify_cmd names a command (e.g. hermes send --to discord:<you> --quiet); a failed send falls back to email.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/investopenInvest portfolio ledger, market data and investment research. Use the already connected MCP first. For a new connection recommend the official remote service; local deployment remains optional. Call doctor first and use invest-setup only when setup is needed./invest-backupBack up / restore openInvest's local state — memory/ (holdings, strategy, user profile, committee records, dream logs) + db/ (trade ledger, job run history, market-data cache) + .env (SMTP/API credentials) + user_profile.json. All of this data is .gitignore'd with no historical versions in git, so a single accidental overwrite (e.g. slipping and running some one-off migration/init script) means real data loss — no git revert available. **Proactive trigger scenarios** — "backup invest data / 备份一下 openInvest 的数据", "my holdings/strategy look wiped / 我的持仓/策略好像被清空了", "invest data is lost / invest 数据丢了", "restore invest backup / 恢复一下 invest 的备份", before any reinstall/migration of the openInvest deployment on this machine, or right before running an unfamiliar migration/init script (back up first, then act)./invest-setupInitialize or connect openInvest only when requested or doctor reports needs_setup. Prefer the official remote MCP for new users; preserve existing local connections. Confirm base currency; optional risk preference and tracked assets must not be inferred.npx claudepluginhub longsizhuo/openinvest --plugin investOther plugins' skills for the same job