본문으로 건너뛰기
cccskills
무료GitHub에 공개

ib-option-chain

Get option chain data from Interactive Brokers for equities, ETFs, and futures (FOP), including calls and puts with strikes, bids, asks, volume, implied volatility, and model Greeks. Use when user asks about options using IBKR data, futures options (NQ/ES/CL/GC...), or needs real-time option quotes from their broker. Requires TWS or IB Gateway running locally.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Interactive Brokers
설치 방법 보기

포함된 파일(2)

  • SKILL.md3.4 KB
  • scripts/options.py2.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

IB Option Chain

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.

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

First, get available expiration dates:

uv run python scripts/options.py SYMBOL --expiries

Then fetch the chain for a specific expiry:

uv run python scripts/options.py SYMBOL --expiry YYYYMMDD

Arguments

  • SYMBOL - Ticker symbol. Equity/ETF (e.g., AAPL, SPY, TSLA) or futures root (e.g., NQ, ES, CL, GC) — asset type is auto-detected via IB.
  • --sec-type {stk,fut} - Force the asset type. Default: auto-detect (stock-first). Use fut for ambiguous roots like ES/CL when you mean the future.
  • --expiries - List available expiration dates only
  • --expiry YYYYMMDD - Fetch chain for specific date (IB format: YYYYMMDD, no dashes)
  • --port - IB port (default: 7497 for paper trading)

Output

Returns JSON with:

  • calls - Array of call options with strike, bid, ask, lastPrice, volume, openInterest, impliedVolatility, greeks (delta/gamma/theta/vega/iv from IB model), and multiplier (futures only)
  • puts - Array of put options with same fields
  • underlying_price - Current underlying price for reference (stock/ETF price or continuous-future price)
  • asset_type - "stock" or "future"
  • source - "ibkr"

For futures, only expiries up to the front continuous-future's expiry are returned; longer-dated FOPs require the next quarter's future. Futures quote nearly 24h on Globex, so Greeks populate pre-market.

Present data as a table. Highlight high volume strikes and notable IV levels.

Dependencies

  • ib-async

Timezone

All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company reports, or upcoming earnings.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings, revenue, profit, balance sheet, income statement, or company fundamentals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

greeks

무료

Calculate option Greeks (delta, gamma, theta, vega) and implied volatility for specific options. Use when user asks about Greeks, delta, gamma, theta, vega, IV, or option sensitivity analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

ib_0dte

무료

Find and place the best 0DTE (zero-days-to-expiration) credit spreads from Interactive Brokers. Default execution route is the EMA9/EMA21 + VIX/VXN regime strategy (ema_vix_0dte.py), which auto-selects bull_put or bear_call from a bare EMA cross and skips the trade when the vol index is elevated (VXN ≥ 35 for NDX/QQQ, VIX ≥ 20 otherwise). Optional --rr-gate and --time-gate add red→red and bar-timing confirmation. Supports cash-settled indices (SPX, NDX, RUT, VIX) and any optionable stock/ETF. Manual spread type override is available via zero_dte.py. Requires TWS or IB Gateway running locally.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

ib-collar

무료

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

staskh/trading_skills3792026년 10월 16일 업데이트

staskh의 스킬 모두 보기

이 스킬의 문제 신고