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.
requests and websocket-client libraries installedpandas and numpy for advanced statistical analysis of flow data${CLAUDE_SKILL_DIR}/config/crypto-apis.env using the Read tool to authenticate against derivatives exchange endpoints.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.--format json or --format csv for integration with trading dashboards or alerting systems.See ${CLAUDE_SKILL_DIR}/references/implementation.md for the full implementation workflow.
| Error | Cause | Solution |
|---|---|---|
API Rate Limit Exceeded |
Too many requests to the derivatives exchange API | Implement request throttling with 100ms minimum between calls; use WebSocket feeds for real-time data instead of polling REST endpoints; upgrade API tier if needed |
Cannot connect to blockchain node or timeout |
RPC endpoint unreachable when resolving on-chain settlement data | Switch to a backup RPC endpoint; verify network connectivity; confirm the node is fully synced |
Invalid API key or signature mismatch |
Exchange API authentication failure | Regenerate API keys on the exchange; verify key permissions include read access to derivatives data; check system clock synchronization (HMAC signatures require accurate timestamps) |
No options data for instrument |
Queried an expired or non-existent options contract | Verify the instrument name matches exchange conventions (e.g., BTC-28MAR25-100000-C on Deribit); check that the expiry has not already passed |
WebSocket connection dropped |
Exchange feed disconnection due to inactivity or network issue | Implement automatic reconnection with exponential backoff; send periodic ping frames to maintain the connection |
Insufficient historical data |
Baseline period too short for statistical comparison | Extend the rolling window from 7 days to 30 days; ensure the data collection pipeline has been running long enough to accumulate history |
# Pull current BTC options chain and compute put/call ratios
python options_flow.py btc --summary
Returns the aggregate put/call ratio, top 5 strikes by open interest, max pain for the nearest expiry, and the current implied volatility at-the-money. A put/call ratio of 0.65 with heavy call OI at the $120K strike suggests bullish institutional positioning.
# Filter for block trades above $1M notional in the last 24 hours
python options_flow.py btc --blocks --min-notional 1000000 --period 24h # 1000000 = 1M limit
Lists all block trades exceeding the threshold with direction inference (aggressor side), strike, expiry, premium paid, and IV at execution. Useful for spotting large directional bets before they move the underlying.
# Generate IV term structure for ETH across all active expiries
python options_flow.py eth --iv-curve --format json > eth_iv_term.json
Exports the IV term structure as JSON. Flat or inverted term structures (near-term IV higher than far-term) often precede sharp directional moves, while steep upward-sloping curves indicate calm near-term expectations.