staskh avatar

Ib Portfolio Action Report

This generates a markdown report of your Interactive Brokers positions with traffic light risk indicators, earnings dates, and technical analysis across all your accounts. It's built for when you need to see what's expiring soon, what's got earnings this week, and what needs attention right now. The script talks to your local TWS or IB Gateway, pulls position data, groups spreads together, and spits out structured JSON that gets formatted into a timestamped report saved to your sandbox. The multi-level urgency breakdown (expiring in 2 days, 1 week, 2 weeks) makes it easy to triage, and having technicals like RSI and MACD alongside earnings dates in one view beats jumping between IB's clunky interface and your broker's different tools.

GitHub stars
248
last updated
Jun 11, 2026

Install

$ npx -y skills add staskh/trading_skills --skill ib-portfolio-action-report --agent claude-code

Installs into .claude/skills of the current project.

Files

IB Portfolio Action Report

Generate a comprehensive portfolio action report that analyzes all positions across Interactive Brokers accounts, fetches earnings dates, and provides traffic-light risk indicators (πŸ”΄πŸŸ‘πŸŸ’) for each position.

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

Step 1: Gather Data

Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.

Sponsors

Details

Repository
github.com/staskh/trading_skills
Categories
Backend & APIs, Git & Pull Requests, Code Review & Quality, Finance & Trading
License
MIT
First seen
Jun 11, 2026

More from staskh/trading_skills

All 28
1sugarforever avatarNext.js Security Scansugarforever/01coder-agent-skillsComprehensive security vulnerability scanner for Next.js and TypeScript/JavaScript projects. Detects OWASP Top 10 vulnerabilities, XSS, injection flaws, authent0skills.sh installs
2sugarforever avatarPython Security Scansugarforever/01coder-agent-skillsComprehensive security vulnerability scanner for Python projects including Flask, Django, and FastAPI applications. Detects OWASP Top 10 vulnerabilities, inject0skills.sh installs
3superior-trade avatarSuperior Tradesuperior-trade/superior-skillsSuperior Trade API key (x-api-key header). Obtained at https://account.superior.trade. Can create/manage backtests and deployments including live trading, and c0skills.sh installs
4syahiidkamil avatarfree-willsyahiidkamil/software-engineer-ai-agent-atlasDeliberate-choice procedure for a medium-to-high-stakes engineering fork β€” when the first plausible solution (the instinct, the default next-token pull) would b0skills.sh installs
5telagod avataranalyzing-spreadsheetstelagod/code-abyssProcesses Excel spreadsheet files (.xlsx, .xlsm, .csv). Creates workbooks, builds formulas, preserves formatting, analyzes tabular data, and validates financial0skills.sh installs
6telagod avatarautomating-devopstelagod/code-abyssDevOps knowledge reference covering Git workflows, testing strategies, DevSecOps, release pipeline orchestration (release.yml, multi-arch images, cosign integra0skills.sh installs