
This pulls option chain data directly from your Interactive Brokers account through TWS or IB Gateway. You get calls and puts with all the expected fields: strikes, bid/ask spreads, volume, open interest, and implied volatility. It's built for when you need actual IBKR data instead of a third-party feed, which matters if you're trading through IB and want to see exactly what your broker sees. The two-step flow is a bit clunky (fetch expiries first, then the chain), but that's how IB's API works. Outputs clean JSON that includes the underlying price for reference. Requires your local IB gateway running, so this isn't pulling data from the cloud.
$ npx -y skills add staskh/trading_skills --skill ib-option-chain --agent claude-codeInstalls into .claude/skills of the current project.
Fetch option chain data from Interactive Brokers for a specific expiration date.
Handles equities/ETFs (Stock/OPT) and futures options (FOP). The asset type and
exchange are resolved from IB contract details (no hardcoded symbol table): auto-detect
tries a SMART stock first and falls back to a future when no stock exists (so NQ, GC,
RTY resolve as futures, while AAPL resolves as a stock even though it has an obscure
single-stock future). Tickers that are both a stock and a futures root (e.g. ES=Eversource,
CL=Colgate) default to the equity — pass --sec-type fut to force the future.
TWS or IB Gateway must be running locally with API enabled:
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.Sponsors