ib-trades-history

Solid

Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (~7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.

AI & Automation 229 stars 56 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
79
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# IB Trades History Fetch trade executions from Interactive Brokers. ## Prerequisites User must have TWS or IB Gateway running locally with API enabled: - Paper trading: port 7497 - Live trading: port 7496 For full trade history beyond ~7 days, the user needs a Flex Web Service token and a pre-configured Trade query in IBKR Account Management. ## Instructions > **Note:** If `uv` is not installed or `pyproject.toml` is not found, replace `uv run python` with `python` in all commands below. ```bash # Recent trades (last ~7 days via API) uv run python .claude/skills/ib-trades-history/scripts/trades.py --all-accounts # Filter by symbol uv run python .claude/skills/ib-trades-history/scripts/trades.py --all-accounts --symbol AAPL # Full history via FlexReport uv run python .claude/skills/ib-trades-history/scripts/trades.py --all-accounts --flex-token YOUR_TOKEN --flex-query-id YOUR_QUERY_ID # Custom date range (FlexReport) uv run python .claude/skills/ib-trades-history/scripts/trades.py --all-accounts --flex-token TOKEN --flex-query-id QID --start-date 2025-01-01 --end-date 2025-12-31 # Multiple queries (e.g., one per year to exceed 365-day limit) uv run python .claude/skills/ib-trades-history/scripts/trades.py --all-accounts --flex-token TOKEN --flex-query-id QID_2025 --flex-query-id QID_2026 --start-date 2025-01-01 --end-date 2026-12-31 # From local FlexReport XML files (no TWS/Gateway needed) uv run python .claude/skills/ib-trades-history/scripts/trades.py --file tra...

Details

Author
staskh
Repository
staskh/trading_skills
Created
3 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

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.

229 Updated today
staskh
AI & Automation Solid

ib-portfolio

Get portfolio positions from Interactive Brokers. Use when user asks about their portfolio, positions, holdings, or what stocks they own. Requires TWS or IB Gateway running locally.

229 Updated today
staskh
Data & Documents Solid

ib-portfolio-action-report

Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.

229 Updated today
staskh
AI & Automation Solid

ib-option-chain

Get option chain data from Interactive Brokers including calls and puts with strikes, bids, asks, volume, and implied volatility. Use when user asks about options using IBKR data, or needs real-time option quotes from their broker. Requires TWS or IB Gateway running locally.

229 Updated today
staskh
AI & Automation Listed

ibkr

Query Interactive Brokers via the local `ibkr` CLI. Use when the user asks about their IBKR account, positions, P&L, market quotes, option chains (incl. per-leg open interest), official market calendars, local watchlist, daily price history, technical/relative-strength screens, running a market scan, sizing a planned trade by fixed-fractional risk, or checking the market's risk regime (S&P 500 breadth, combined SPY+SPX dealer zero-gamma with 0DTE / 1-7 / term horizon split, the eight-row regime dashboard). Read-only — never attempts to place orders.

2 Updated today
osauer