staskh/trading_skills

ib-account

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.

First seen Mar 1, 2026

Installation

$ npx skills add staskh/trading_skills --skill ib-account

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from staskh/trading_skills · top by installs.

npx skills add staskh/trading_skills

Browse all from staskh/trading_skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 362
License LICENSE
Default branch main
Open issues 15
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,148 B
  • docs SUMMARY.md 245 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 84 installs

SKILL.md

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
  • IBPORT env var — default port when --port is omitted (e.g. IBPORT=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.

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/NewYork timezone. All JSON output must include generatedat (NY time string) and data_delay fields.