Tracking Crypto Derivatives
Overview
Aggregate funding rates, open interest, liquidations, and options data across CEX and DEX derivatives exchanges to produce actionable trading insights.
Supported Markets: Perpetual Swaps (Binance, Bybit, OKX, Deribit, BitMEX), Quarterly Futures, Options (Deribit, OKX, Bybit), DEX Perpetuals (dYdX, GMX, Drift Protocol).
Prerequisites
- Python 3.8+ installed
- Network access to exchange APIs
- Optional: API keys for higher rate limits
- Understanding of derivatives concepts (funding, OI, basis)
Instructions
Check funding rates across exchanges to identify sentiment and arbitrage opportunities:
python derivatives_tracker.py funding BTC
python derivatives_tracker.py funding BTC ETH SOL
python derivatives_tracker.py funding BTC --history 7d
- Positive funding (>0.01%): Longs pay shorts, bullish sentiment
- Negative funding (<-0.01%): Shorts pay longs, bearish sentiment
- Extreme funding (>0.1%): Potential contrarian opportunity
Analyze open interest to gauge market positioning and trend strength:
python derivatives_tracker.py oi BTC
python derivatives_tracker.py oi BTC --changes
python derivatives_tracker.py oi BTC --divergence
- Rising OI + Rising Price = strong bullish trend
- Rising OI + Falling Price = strong bearish trend
- Falling OI + Rising Price = short covering rally
- Falling OI + Falling Price = long liquidations
Monitor liquidations to find support/resistance clusters:
python derivatives_tracker.py liquidations BTC
python derivatives_tracker.py liquidations BTC --recent
python derivatives_tracker.py liquidations BTC --min-size 100000 # 100000 = minimum USD liquidation size filter
Analyze options market for IV, put/call ratio, and max pain:
python derivatives_tracker.py options BTC
python derivatives_tracker.py options BTC --pcr
python derivatives_tracker.py options BTC --expiry 2025-01-31 # 2025 = target expiry year
Calculate basis for spot-futures arbitrage opportunities:
python derivatives_tracker.py basis BTC
python derivatives_tracker.py basis BTC --quarterly
python derivatives_tracker.py basis --all
Run full dashboard for comprehensive derivatives overview:
python derivatives_tracker.py dashboard BTC
python derivatives_tracker.py dashboard BTC ETH SOL
python derivatives_tracker.py dashboard BTC --output json
Output
The skill produces structured reports per market type:
- Funding Rate Report: Current, 24h avg, 7d avg rates per exchange with annualized yield and sentiment
- Open Interest Report: OI per exchange with 24h/7d changes, share %, and long/short ratio
- Liquidation Heatmap: Long/short liquidation clusters by price level with USD density
- Options Overview: Put/call ratio, IV rank, max pain, and large flow alerts
- Basis Report: Spot-perp and quarterly basis with annualized carry rates
See ${CLAUDE_SKILL_DIR}/references/implementation.md for detailed output format examples.
Error Handling
| Error |
Cause |
Fix |
ERR_RATE_LIMIT |
Too many API requests |
Reduce frequency or add API key |
ERR_EXCHANGE_DOWN |
Exchange API unavailable |
Try alternative exchange |
ERR_SYMBOL_INVALID |
Wrong symbol format |
Use BTC, ETH (not BTCUSDT) |
Examples
Morning derivatives check - Scan funding, OI, and liquidations for top assets:
python derivatives_tracker.py dashboard BTC ETH SOL
Funding rate arbitrage - Alert when funding exceeds threshold for cash-and-carry:
python derivatives_tracker.py funding BTC --alert-threshold 0.08
Pre-expiry options analysis - Check max pain and IV before Friday expiry:
python derivatives_tracker.py options BTC --expiry friday
Basis trading scan - Find all pairs with annualized yield above 5%:
python derivatives_tracker.py basis --all --min-yield 5 # 5 = minimum annualized yield %
Resources
- Coinglass: Aggregated derivatives data
- Exchange APIs: Binance, Bybit, OKX, Deribit
- The Graph: DEX perpetuals data
${CLAUDE_SKILL_DIR}/references/implementation.md - Detailed output formats, options/basis guides, key concepts
1---
2name: tracking-crypto-derivatives
3description: |
4 Track cryptocurrency futures, options, and perpetual swaps with funding rates, open interest, liquidations, and comprehensive derivatives market analysis.
5 Use when monitoring derivatives markets, analyzing funding rates, tracking open interest, finding liquidation levels, or researching options flow.
6 Trigger with phrases like "funding rate", "open interest", "perpetual swap", "futures basis", "liquidation levels", "options flow", "put call ratio", "derivatives analysis", or "BTC perps".
7allowed-tools: Read, Write, Edit, Grep, Glob, Bash(crypto:derivatives-*)
8version: 1.0.0
9author: Jeremy Longshore <jeremy@intentsolutions.io>
10license: MIT
11compatible-with: claude-code, codex, openclaw
12metadata:
13 source: https://skillmd.com/skills/micsapp/tracking-crypto-derivatives
14---
15
16# Tracking Crypto Derivatives
17
18## Overview
19
20Aggregate funding rates, open interest, liquidations, and options data across CEX and DEX derivatives exchanges to produce actionable trading insights.
21
22**Supported Markets**: Perpetual Swaps (Binance, Bybit, OKX, Deribit, BitMEX), Quarterly Futures, Options (Deribit, OKX, Bybit), DEX Perpetuals (dYdX, GMX, Drift Protocol).
23
24## Prerequisites
25
26- Python 3.8+ installed
27- Network access to exchange APIs
28- Optional: API keys for higher rate limits
29- Understanding of derivatives concepts (funding, OI, basis)
30
31## Instructions
32
331. **Check funding rates** across exchanges to identify sentiment and arbitrage opportunities:
34 ```bash
35 python derivatives_tracker.py funding BTC
36 python derivatives_tracker.py funding BTC ETH SOL
37 python derivatives_tracker.py funding BTC --history 7d
38 ```
39 - Positive funding (>0.01%): Longs pay shorts, bullish sentiment
40 - Negative funding (<-0.01%): Shorts pay longs, bearish sentiment
41 - Extreme funding (>0.1%): Potential contrarian opportunity
42
432. **Analyze open interest** to gauge market positioning and trend strength:
44 ```bash
45 python derivatives_tracker.py oi BTC
46 python derivatives_tracker.py oi BTC --changes
47 python derivatives_tracker.py oi BTC --divergence
48 ```
49 - Rising OI + Rising Price = strong bullish trend
50 - Rising OI + Falling Price = strong bearish trend
51 - Falling OI + Rising Price = short covering rally
52 - Falling OI + Falling Price = long liquidations
53
543. **Monitor liquidations** to find support/resistance clusters:
55 ```bash
56 python derivatives_tracker.py liquidations BTC
57 python derivatives_tracker.py liquidations BTC --recent
58 python derivatives_tracker.py liquidations BTC --min-size 100000 # 100000 = minimum USD liquidation size filter
59 ```
60
614. **Analyze options market** for IV, put/call ratio, and max pain:
62 ```bash
63 python derivatives_tracker.py options BTC
64 python derivatives_tracker.py options BTC --pcr
65 python derivatives_tracker.py options BTC --expiry 2025-01-31 # 2025 = target expiry year
66 ```
67
685. **Calculate basis** for spot-futures arbitrage opportunities:
69 ```bash
70 python derivatives_tracker.py basis BTC
71 python derivatives_tracker.py basis BTC --quarterly
72 python derivatives_tracker.py basis --all
73 ```
74
756. **Run full dashboard** for comprehensive derivatives overview:
76 ```bash
77 python derivatives_tracker.py dashboard BTC
78 python derivatives_tracker.py dashboard BTC ETH SOL
79 python derivatives_tracker.py dashboard BTC --output json
80 ```
81
82## Output
83
84The skill produces structured reports per market type:
85
86- **Funding Rate Report**: Current, 24h avg, 7d avg rates per exchange with annualized yield and sentiment
87- **Open Interest Report**: OI per exchange with 24h/7d changes, share %, and long/short ratio
88- **Liquidation Heatmap**: Long/short liquidation clusters by price level with USD density
89- **Options Overview**: Put/call ratio, IV rank, max pain, and large flow alerts
90- **Basis Report**: Spot-perp and quarterly basis with annualized carry rates
91
92See `${CLAUDE_SKILL_DIR}/references/implementation.md` for detailed output format examples.
93
94## Error Handling
95
96| Error | Cause | Fix |
97|-------|-------|-----|
98| `ERR_RATE_LIMIT` | Too many API requests | Reduce frequency or add API key |
99| `ERR_EXCHANGE_DOWN` | Exchange API unavailable | Try alternative exchange |
100| `ERR_SYMBOL_INVALID` | Wrong symbol format | Use BTC, ETH (not BTCUSDT) |
101
102## Examples
103
104**Morning derivatives check** - Scan funding, OI, and liquidations for top assets:
105```bash
106python derivatives_tracker.py dashboard BTC ETH SOL
107```
108
109**Funding rate arbitrage** - Alert when funding exceeds threshold for cash-and-carry:
110```bash
111python derivatives_tracker.py funding BTC --alert-threshold 0.08
112```
113
114**Pre-expiry options analysis** - Check max pain and IV before Friday expiry:
115```bash
116python derivatives_tracker.py options BTC --expiry friday
117```
118
119**Basis trading scan** - Find all pairs with annualized yield above 5%:
120```bash
121python derivatives_tracker.py basis --all --min-yield 5 # 5 = minimum annualized yield %
122```
123
124## Resources
125
126- **Coinglass**: Aggregated derivatives data
127- **Exchange APIs**: Binance, Bybit, OKX, Deribit
128- **The Graph**: DEX perpetuals data
129- `${CLAUDE_SKILL_DIR}/references/implementation.md` - Detailed output formats, options/basis guides, key concepts