ib-portfolio
IB Portfolio connects to your Interactive Brokers account to display current positions, quantities, average costs, and market values. It works with TWS or IB Gateway running locally and automatically handles paper and live trading ports. The skill returns structured position data including unrealized profit/loss for each holding.
IB Portfolio retrieves your current positions and holdings directly from Interactive Brokers.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-20
IB Portfolio retrieves your current positions and holdings directly from Interactive Brokers. IB Portfolio connects to your Interactive Brokers account to display current positions, quantities, average costs, and market values. It works with TWS or IB Gateway running locally and automatically handles paper and live trading ports. The skill returns structured position data including unrealized profit/loss for each holding.
Use it when
- ib-portfolio connects to your local TWS or IB Gateway instance to fetch live account data.
- Yes.
Verify before relying
Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.
Install
staskh/trading_skills/ib-portfolio · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What stocks do I own in IB using ib-portfolio?
ib-portfolio retrieves your current stock holdings directly from Interactive Brokers. It connects to TWS or IB Gateway running locally and displays each position with its quantity, average cost, and current market value. The skill automatically detects whether you're using paper or live trading and connects to the appropriate port.
How does ib-portfolio get my current positions from Interactive Brokers?
ib-portfolio connects to your local TWS or IB Gateway instance to fetch live account data. It queries your Interactive Brokers account and returns structured position information including stock symbols, quantities held, average purchase costs, and unrealized gains or losses for each holding.
Can ib-portfolio show unrealized gains and losses?
Yes. ib-portfolio displays the market value and unrealized profit/loss for each position in your account. This lets you see at a glance how each holding is performing relative to your average cost basis.
What do I need to run ib-portfolio?
ib-portfolio requires TWS (Trader Workstation) or IB Gateway running locally on your machine. The skill automatically handles connection to both paper and live trading ports, so you don't need to configure the port manually. Your Interactive Brokers account must be logged in and active.
Does ib-portfolio work with multiple Interactive Brokers accounts?
ib-portfolio connects to whichever account is currently logged into your local TWS or IB Gateway instance. To check positions across multiple accounts, you would need to switch the logged-in account in TWS/Gateway and run the skill again.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
IB Portfolio
Fetch current portfolio positions 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
(truncated - see the full file via the links below)
File tree — 2 files
.claude/skills/ib-portfolio/SKILL.md
.claude/skills/ib-portfolio/scripts/portfolio.py
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Retrieve current portfolio positions and holdings from Interactive Brokers”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Analyze roll opportunities for existing short options or identify best covered calls/puts to open against long stock. The skill connects to Interactive Brokers via TWS or IB Gateway, evaluates candidates across multiple expirations, and uses IV-aware strike bands to surface relevant alternatives tailored to market conditions.
Analyze all positions in your Interactive Brokers accounts with traffic-light risk indicators and earnings exposure. The skill gathers portfolio data, fetches earnings dates, and delivers technical analysis in a prioritized markdown report highlighting positions requiring immediate attention.
ib-account fetches your account summary directly from Interactive Brokers, including net liquidation value, available cash, and buying power. It connects through TWS or IB Gateway running locally and automatically detects whether you're trading paper or live accounts, with fallback retry logic to ensure reliable connections.
This skill computes delta-adjusted notional exposure across all your IBKR accounts, using Black-Scholes to price option deltas and reporting directional risk by account and underlying. It connects to TWS or IB Gateway, processes positions including equities, futures, and options, and generates a markdown report with summary tables and top exposures.
Pull trade executions directly from your Interactive Brokers account via live API (recent ~7 days) or FlexReport (full history). Filter by account, symbol, or date range, and get back execution details with per-symbol summaries including commissions and realized P&L.
This skill builds collar strategy reports for PMCC traders facing earnings or volatility spikes. It connects to Interactive Brokers, analyzes your long LEAPS and short calls, models put protection scenarios across gap-up/flat/down outcomes, and recommends optimal strike and duration for tactical hedging.
More skills ib-stop-loss (MIT) · Ibkr Api Skill (unlicensed) · ib-pmcc-advisor (MIT) · Portfoliosyncing (NOASSERTION)