IB Trades History
Fetch your Interactive Brokers trade executions by account, date range or symbol, from the live API for today or from FlexReport for full history, with optional vertical spread grouping.
- What
- Fetch your Interactive Brokers trade executions by account, date range or symbol, from the live API for today or from FlexReport for full history, with optional vertical spread grouping.
- Cost
- Free
- Needs
- Use "IB Trades History" with your Muse.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
⚠️ **Finance warning / Avertissement finance** : informational only, not investment advice. This skill reads the execution history of a REAL Interactive Brokers account: the numbers describe what already happened, commissions and realized profit and loss included, they do not predict anything, there is a real risk of loss in any trading this history feeds into, and no output here is a promise of return. Curated by Skill Harbor: the IB trades history skill of staskh/trading_skills. Use it when you ask about your trades, executions or transaction history at Interactive Brokers, filtered by account, date range or symbol. It has three data sources and the skill is honest about each one: the live API, which in practice returns only the current TWS session despite what the API documentation implies (a weekend or prior-day lookback can return zero executions and look exactly like no trades), FlexReport through the Flex Web Service for full history, and local FlexReport XML files you exported yourself, which need no TWS or Gateway at all. The output is structured JSON: connection status, source used, the filters applied, an explicit data limitation warning on the live API path, the execution list, and per-symbol aggregates of bought, sold, commission and realized profit and loss. With the spread grouping option (FlexReport sources only, because only they carry the open and close indicator) raw fills are consolidated into legs and paired into vertical spreads with credit, width, maximum risk, capture percentage and return on risk, anything that is not an unambiguous two-strike vertical is left ungrouped with a reason instead of being force-fit, and a reconciliation check asserts that spread plus ungrouped profit and loss equals the raw execution total. This skill is read-only: it fetches and reports history, it places no orders. From the staskh/trading_skills repository (MIT). Honest caveats: for anything beyond today, use FlexReport, and note that the Flex web service is aggressively rate limited (roughly one generation per query per 10 to 15 minutes), so large lookbacks are better as manual XML exports read from local files; the Flex token and query IDs are credentials, keep them in environment variables or a local env file (IB_FLEX_TOKEN, IB_FLEX_QUERY_ID), never in a chat, and the same goes for every other IB credential, which belongs only in the local TWS or Gateway login. When TWS or Gateway is used, port 7497 is paper trading and port 7496 is the live real-money account. Skill Harbor never reviews the code, review it yourself before use.
Version:
Install
Copy the install package below, then paste it into MuseThe install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Use "IB Trades History" with your Muse. MAXIMUM WARNING, READ FIRST: this skill reads a REAL Interactive Brokers account. It is read-only and places no orders, but it exposes your real execution history, so treat its output as private account data. When TWS or IB Gateway is used locally with the API enabled, port 7497 is paper trading by default and port 7496 is the live real-money account; start on paper if you are testing the connection. Your credentials stay only inside the local TWS or Gateway login or in environment variables, never paste them into a chat, and that includes the Flex Web Service token and query IDs (IB_FLEX_TOKEN, IB_FLEX_QUERY_ID), which belong in environment variables or a local env file only. Prerequisites: the staskh/trading_skills repo cloned locally, uv (or Python) with ib-async; for history beyond the current session, a Flex token and a pre-configured Trade query in IBKR Account Management, or local FlexReport XML exports. Informational only, not investment advice, and there is a real risk of loss in any trading. 1. Open the skill: https://github.com/staskh/trading_skills/blob/main/.claude/skills/ib-trades-history/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Fetch my IB trade executions for all accounts for the period I name, using FlexReport or my local XML files for anything beyond today, and give me the per-symbol summary of bought, sold, commissions and realized profit and loss, with the data limitation stated if the live API was used." 3. Check the source field in the output before trusting a zero: on the live API path, zero executions usually means the session window, not an empty history. Tip: for a multi-year lookback, export one FlexReport XML per year manually and read them from local files; it avoids the Flex web rate limit entirely. Safety: a skill is plain-text instructions; it runs nothing by itself. Read-only history access, no orders. Informational only, not investment advice.
Saved to your recent installs. Find it anytime on /connect.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.