Skip to content
alyn
staskh

Ib Account skill

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.

$npx skills add staskh/trading_skills --skill ib-account
View this skill on GitHubstaskh/trading_skills/.claude/skills/ib-account/SKILL.md
Pack stars
407
Pack installs
3.1k
Alyn Score
52/99
Updated
2 days ago
License
MIT
– views – installs via Alyn

Install Ib Account

Pick your agent. Every command is ready to paste.

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

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads ib-account when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the ib-account skill”. In Codex, type $ib-account.

The skill itself

SKILL.md

FolderGitHub

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.

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.

Tips for Ib Account

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Ib Account

What does the Ib Account skill do?

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.

How do I install Ib Account?

Run "npx skills add staskh/trading_skills --skill ib-account" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Ib Account work in Cursor and Codex?

Yes. Ib Account uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Ib Account free?

Ib Account is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Ib Account?

Ib Account is published by staskh in the staskh/trading_skills repository, together with 29 other skills.

Similar skills. From other creators.