ib-account — Claude Code skill for Interactive Brokers accounts
The ib-account Claude Code skill fetches an Interactive Brokers account summary. It activates for questions about balances, buying power, or available cash.
MIT 103 installs ★ 417 updated 2026-10-21
npx skills add staskh/trading_skills --skill ib-account -a claude-codeWhat ib-account does
The skill retrieves account figures from Interactive Brokers, including cash, buying power, and account value. It returns JSON with account IDs and connection status. By default, it fetches the first managed account; use --all-accounts for every managed account or --account ACCOUNT_ID to select one.
TWS or IB Gateway must run locally with API access enabled. Paper trading uses port 7497, while live trading uses 7496; set a port with --port or IB_PORT. The skill runs scripts/account.py through uv run python. If uv is unavailable or pyproject.toml cannot be found, use python instead. The trading-skills and ib-async dependencies are required.
If the configured port fails, the script retries on the other port. If neither connection works, TWS or IB Gateway must be running with API access enabled. Timestamps and time-based calculations use America/New_York; the JSON output includes generated_at and data_delay.
What it helps with
- retrieve an Interactive Brokers cash balance
- check account buying power and value
- fetch summaries for all managed accounts
- request details for a specific account ID
Example prompts for the agent
- Show my Interactive Brokers balance and buying power.
- Fetch summaries for all my Interactive Brokers accounts.
- Get the details for account
ACCOUNT_ID.
How to install ib-account
1Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a claude-code2Manually: put the files in place
~/.claude/skills/ib-account/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ib-account/
1Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a codex2Manually: put the files in place
.agents/skills/ib-account/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a cursor2Manually: put the files in place
.cursor/skills/ib-account/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install staskh/trading_skills .claude/skills/ib-account2Manually: put the files in place
.github/skills/ib-account/SKILL.md1Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a gemini-cli2Platform CLI
gemini skills install https://github.com/staskh/trading_skills --path .claude/skills/ib-accountManually: put the files in place
.devin/skills/ib-account/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add staskh/trading_skills --skill ib-account -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ib-account
How do I install ib-account in Claude Code?
Run npx skills add staskh/trading_skills --skill ib-account -a claude-code. The skill file is at ~/.claude/skills/ib-account/SKILL.md.
What does ib-account do?
It retrieves an Interactive Brokers account summary, including cash and buying power, and returns the results as JSON.
What does ib-account need to run?
TWS or IB Gateway must be running locally with API access enabled. The required dependencies are trading-skills and ib-async; execution uses uv run python, or python if uv is unavailable or pyproject.toml is missing.
Source text
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