
Ib Find Short Roll
This connects Claude to your Interactive Brokers account to analyze option rolling strategies and covered call opportunities. It auto-detects your positions (short options, long options, or long stock) and pulls real-time data to suggest roll candidates or new shorts to open. You get JSON output with candidates ranked across different strikes and expirations, plus earnings dates to avoid. The script handles three modes: rolling existing shorts, creating vertical spreads against long options, or writing covered calls against stock. Requires TWS or IB Gateway running locally. The markdown template formats everything into a readable report. Honestly most useful if you're actively managing option positions and want quick analysis without clicking through IB's interface.
- GitHub stars
- 248
- last updated
- Jun 11, 2026
Install
$ npx -y skills add staskh/trading_skills --skill ib-find-short-roll --agent claude-codeInstalls into .claude/skills of the current project.
Files
IB Find Short Roll
Analyze roll options for short positions or find best short options to open against long stock using real-time data 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_PORTenv var — default port when--portis omitted (e.g.IB_PORT=4001for a Gateway container). Precedence:--portflag >IB_PORT> built-in default. Set it in the shell or a.envfile.
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
uvis not installed orpyproject.tomlis not found, replaceuv run pythonwithpythonin all commands below.
Sponsors
Details
- Repository
- github.com/staskh/trading_skills
- Categories
- Backend & APIs, Documentation, Finance & Trading
- License
- MIT
- First seen
- Jun 11, 2026
More from staskh/trading_skills
All 28- Ib Option Chain
- Ib Pmcc Advisor
- Ib Portfolio
- Ib Portfolio Action Report
- Ib Report Delta Adjusted Notional Exposure
- Ib Stop Loss
- Ib Trades History
- Ib Trailing Stop
- Insider Trading
- Markdown To Pdf
- Price History
- Scanner Bullish
- Scanner Pmcc
- Spread Analysis
- Whale Hunting
- Technical Analysis598
- News Sentiment246
- Fundamentals182
- Stock Quote131
- Greeks128
- Report Stock117
- Option Chain111
- Risk Assessment105
- Earnings Calendar