ib-account — скилл для Claude Code: баланс Interactive Brokers
Скилл ib-account для Claude Code получает сводку счёта Interactive Brokers. Запускается, когда спрашивают о балансе, доступных средствах или покупательной способности.
MIT 103 установок ★ 417 обновлён 2026-10-21
npx skills add staskh/trading_skills --skill ib-account -a claude-codeЧто делает ib-account
Скилл запрашивает у Interactive Brokers сводку счёта: денежный остаток, покупательную способность, стоимость счёта и другие показатели. Результат возвращается в JSON с идентификаторами счетов и статусом подключения. По умолчанию запрашивается первый управляемый счёт; для сводок по всем счетам используется --all-accounts, а для одного конкретного — --account ACCOUNT_ID.
Для подключения локально должны работать TWS или IB Gateway с включённым API. Бумажной торговле соответствует порт 7497, реальной — 7496; порт можно задать через --port или IB_PORT. Скилл запускает scripts/account.py через uv run python; если uv не установлен или нет pyproject.toml, в командах используется python. Нужны зависимости trading-skills и ib-async.
При неудаче на заданном порту скрипт пробует другой; если оба подключения не сработали, нужен запущенный TWS или IB Gateway с доступом к API. Временные метки и расчёты времени используют America/New_York, а JSON включает поля generated_at и data_delay.
Какие задачи решает
- получить денежный остаток счёта Interactive Brokers
- узнать покупательную способность и стоимость счёта
- запросить сводки по всем управляемым счетам
- выбрать конкретный счёт по его идентификатору
Примеры запросов агенту
- Покажи баланс и покупательную способность моего счёта Interactive Brokers.
- Получи сводки по всем моим счетам Interactive Brokers.
- Запроси данные счёта
ACCOUNT_ID.
Как установить ib-account
1Через Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a claude-code2Вручную: положить файлы
~/.claude/skills/ib-account/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/ib-account/
1Через Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a codex2Вручную: положить файлы
.agents/skills/ib-account/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a cursor2Вручную: положить файлы
.cursor/skills/ib-account/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install staskh/trading_skills .claude/skills/ib-account2Вручную: положить файлы
.github/skills/ib-account/SKILL.md1Через Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a gemini-cli2Командой платформы
gemini skills install https://github.com/staskh/trading_skills --path .claude/skills/ib-accountВручную: положить файлы
.devin/skills/ib-account/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об ib-account
Как установить ib-account в Claude Code?
Выполни npx skills add staskh/trading_skills --skill ib-account -a claude-code. Файл скилла находится по пути ~/.claude/skills/ib-account/SKILL.md.
Что делает ib-account?
Он получает из Interactive Brokers сводку счёта, включая денежный остаток и покупательную способность, и возвращает результат в JSON.
Что нужно для работы ib-account?
Нужны локально запущенный TWS или IB Gateway с включённым API, а также зависимости trading-skills и ib-async. Для запуска используется uv run python; если uv не установлен или отсутствует pyproject.toml, используется python.
Исходный текст
SKILL.md · MIT
--- name: ib-account description: Get account summary from Interactive Brokers including cash balance, buying power, and account value. Use when user asks about their account, balance, buying power, or available cash. Requires TWS or IB Gateway running locally. dependencies: ["trading-skills"] --- # IB Account Fetch account summary from Interactive Brokers. ## IB Connection TWS or IB Gateway must be running locally with API enabled: - **Paper trading** — port 7497 - **Live trading** — port 7496 - **`IB_PORT` env var** — default port when `--port` is omitted (e.g. `IB_PORT=4001` for a Gateway container). Precedence: `--port` flag > `IB_PORT` > built-in default. Set it in the shell or a `.env` file. **Port fallback:** If the configured port fails, automatically retry on the other port. If the retry succeeds, save to memory which account type worked (live/paper) and reuse it for all IB skill calls in this and future sessions — until the user explicitly asks for the other account. If both ports fail, ask the user to verify that TWS or IB Gateway is running with API access enabled. ## Instructions > **Note:** If `uv` is not installed or `pyproject.toml` is not found, replace `uv run python` with `python` in all commands below. ```bash uv run python scripts/account.py [--port PORT] [--account ACCOUNT_ID] [--all-accounts] ``` ## Arguments - `--port` - IB port (default: 7497 for paper trading) - `--account` - Specific account ID to fetch - `--all-accounts` - Fetch summaries for all managed accounts **Default behavior** (no flags): fetches the first managed account only. **Always use `--all-accounts`** unless the user asks for a specific account. ## Output Returns JSON with: - `connected` - Whether connection succeeded - `accounts` - List of account summaries, each with account ID, net liquidation, cash, buying power, etc. If not connected, explain that TWS/Gateway needs to be running. ## Dependencies - `ib-async` ## Timezone All timestamps and time-based calculations must use the `America/New_York` timezone. All JSON output must include `generated_at` (NY time string) and `data_delay` fields.
© staskh · MIT · staskh/trading_skills