Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add staskh/trading_skills --skill ib-account -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/ib-account/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ib-account/

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

Similar skills

SKILL.md skills catalog →
multi-account-isolation antibrow multi-account-isolation turns profile isolation from an assumption into eleven assertions: timezone against exit IP, WebRTC candidates, canvas hash stability, persona and cookie-jar collisions across the fleet. CX Codex +1 138,200installs sales-account-tiering Maya-Beth Finotti sales-account-tiering builds the tier layer on top of an existing account fit score: where cutoffs sit, what tiers are called, how many accounts a rep can hold. Use it when everything drifted into Tier 1. CX Codex +1 34,500installs sales-account-segmentation Maya-Beth Finotti sales-account-segmentation builds an account segmentation model between ICP and tier structure. It computes a fit score from 12 months of closed-won deals and maps expansion whitespace for CRM operations. CX Codex +1 33,600installs google-ads-api-account-diagnostics official google-ads-api-team google-ads-api-account-diagnostics is a Claude Code skill for tracing drops in conversions, lead volume, and impression share. It checks whether bids or budgets constrain delivery. CX Codex +1 5,508installs resilience-hub-multi-account aws resilience-hub-multi-account configures AWS Resilience Hub v2 to assess workloads spanning multiple AWS accounts using a per-service IAM permission model. CX Codex +1 4,700installs account-research official anthropics account-research researches target prospect companies, checks fit against your ICP, and cross-references CRM records before outreach. CX Codex +1 3,600installs

From the same set12

The whole set →
stock-quote stock-quote is a Claude Code skill that fetches current price, volume, change, and 52-week range for any ticker. CX Codex +1 138installs greeks Skill computes option Greeks (delta, gamma, theta, vega) and implied volatility using the Black-Scholes model. Use it to understand how your position reacts to price changes, time decay, and shifts in volatility. CX Codex +1 137installs report-stock report-stock builds stock research reports in Markdown or PDF covering market trends, PMCC viability, and company fundamentals. CX Codex +1 123installs option-chain Skill pulls option chain data from Yahoo Finance: calls and puts with strike prices, bids, asks, volumes, and implied volatility. Use it to check option quotes for a specific expiration date. CX Codex +1 117installs risk-assessment risk-assessment calculates risk metrics for stocks and positions: volatility, beta, Value at Risk, and maximum drawdown. Use it to assess position risk and determine sizing. CX Codex +1 113installs ib-portfolio ib-portfolio — a skill for Claude Code fetches open positions and holdings from Interactive Brokers. The agent invokes it when asked about current stocks, portfolio value, or account assets. CX Codex +1 107installs spread-analysis The spread-analysis skill performs quantitative analysis of multi-leg option strategies for Claude Code. It triggers on requests concerning vertical spreads, iron condors, straddles, or strangle strategies. CX Codex +1 105installs price-history The price-history Claude Code skill fetches historical OHLCV data for a stock. It activates for requests about past prices or data for chart analysis. CX Codex +1 102installs

Project sponsors

Companies that keep this analytics open