Analyzing Options Flow
Overview
Track and analyze crypto options flow on centralized derivatives exchanges (Deribit, OKX, Bybit) to identify institutional positioning, gauge market sentiment, and detect unusual activity in BTC and ETH options markets.
Prerequisites
- API credentials for at least one crypto derivatives exchange (Deribit API key recommended; OKX or Bybit as alternatives)
- Python 3.8+ with
requestsandwebsocket-clientlibraries installed - Optional:
pandasandnumpyfor advanced statistical analysis of flow data - Understanding of options terminology: strike price, expiry, implied volatility, delta, gamma, open interest, and premium
- Network access to exchange WebSocket feeds for real-time flow monitoring
Instructions
- Load exchange API credentials from
${CLAUDE_SKILL_DIR}/config/crypto-apis.envusing the Read tool to authenticate against derivatives exchange endpoints. - Run
Bash(crypto:options-*)to connect to the Deribit options data feed and pull the current options chain for BTC or ETH, including all active strikes and expiries. - Retrieve open interest data across all strike prices and expiration dates to build an open interest heatmap showing where positions are concentrated.
- Calculate the aggregate put/call ratio by volume and by open interest to assess overall market sentiment (ratio above 1.0 indicates bearish bias; below 1.0 indicates bullish).
- Filter for block trades exceeding a configurable notional threshold (e.g., $500K+) to isolate institutional-sized activity from retail noise.
- Analyze the implied volatility term structure across expiry dates to detect vol compression (potential breakout ahead) or vol expansion (uncertainty increasing).
- Track max pain levels for upcoming expiries by computing the strike price at which the most options expire worthless, indicating likely price magnetism near expiry.
- Compare recent flow data against historical baselines (7-day and 30-day rolling averages) to flag statistically unusual positioning.
- Generate a flow summary report with actionable signals: bullish large-block calls, bearish put sweeps, IV skew shifts, and OI buildup at key strikes.
- Export results using
--format jsonor--format csvfor integration with trading dashboards or alerting systems.