@intentsolutionsio/crypto-derivatives-tracker 1.0.0 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/agents/derivatives-agent.md +58 -3
- package/package.json +1 -1
- package/skills/skill-adapter/references/README.md +0 -1
- package/skills/skill-adapter/references/examples.md +6 -0
- package/skills/tracking-crypto-derivatives/ARD.md +22 -0
- package/skills/tracking-crypto-derivatives/PRD.md +26 -0
- package/skills/tracking-crypto-derivatives/SKILL.md +28 -6
- package/skills/tracking-crypto-derivatives/references/errors.md +24 -0
- package/skills/tracking-crypto-derivatives/references/examples.md +19 -0
- package/skills/tracking-crypto-derivatives/references/implementation.md +8 -0
- package/skills/tracking-crypto-derivatives/scripts/basis_calculator.py +23 -24
- package/skills/tracking-crypto-derivatives/scripts/derivatives_tracker.py +176 -175
- package/skills/tracking-crypto-derivatives/scripts/formatters.py +13 -18
- package/skills/tracking-crypto-derivatives/scripts/funding_tracker.py +34 -34
- package/skills/tracking-crypto-derivatives/scripts/liquidation_monitor.py +31 -35
- package/skills/tracking-crypto-derivatives/scripts/oi_analyzer.py +23 -27
- package/skills/tracking-crypto-derivatives/scripts/options_analyzer.py +42 -41
- package/skills/skill-adapter/scripts/validation.sh +0 -32
|
@@ -25,18 +25,21 @@ Manual monitoring is impractical given the 24/7 nature of crypto markets and the
|
|
|
25
25
|
## Target Users
|
|
26
26
|
|
|
27
27
|
### Persona 1: Derivatives Day Trader
|
|
28
|
+
|
|
28
29
|
- **Background**: Full-time crypto trader focusing on perpetual swaps
|
|
29
30
|
- **Goals**: Profit from funding rate extremes, OI divergences, and liquidation cascades
|
|
30
31
|
- **Pain Points**: Data fragmented across exchanges, misses funding changes
|
|
31
32
|
- **Success Criteria**: Consistent funding capture, early entry before liquidation cascades
|
|
32
33
|
|
|
33
34
|
### Persona 2: Basis Arbitrageur
|
|
35
|
+
|
|
34
36
|
- **Background**: Market-neutral trader running cash-and-carry strategies
|
|
35
37
|
- **Goals**: Lock in risk-free returns via spot-futures basis trades
|
|
36
38
|
- **Pain Points**: Manual basis calculations, timing entry/exit around funding
|
|
37
39
|
- **Success Criteria**: Captures basis premium with minimal directional risk
|
|
38
40
|
|
|
39
41
|
### Persona 3: Options Flow Analyst
|
|
42
|
+
|
|
40
43
|
- **Background**: Institutional researcher tracking smart money via options
|
|
41
44
|
- **Goals**: Identify unusual options activity and positioning before moves
|
|
42
45
|
- **Pain Points**: Options data scattered, hard to interpret Greeks at scale
|
|
@@ -47,66 +50,78 @@ Manual monitoring is impractical given the 24/7 nature of crypto markets and the
|
|
|
47
50
|
## User Stories
|
|
48
51
|
|
|
49
52
|
### US-1: Funding Rate Monitoring (Critical)
|
|
53
|
+
|
|
50
54
|
**As a** derivatives trader
|
|
51
55
|
**I want to** see funding rates across all major exchanges in one view
|
|
52
56
|
**So that** I can identify arbitrage opportunities and sentiment extremes
|
|
53
57
|
|
|
54
58
|
**Acceptance Criteria**:
|
|
59
|
+
|
|
55
60
|
- Display funding rates for BTC, ETH, SOL across Binance, Bybit, OKX, Deribit
|
|
56
61
|
- Show current, 24h average, and 7d average rates
|
|
57
62
|
- Calculate annualized funding yield
|
|
58
63
|
- Alert when funding exceeds configurable threshold (default: 0.1%)
|
|
59
64
|
|
|
60
65
|
### US-2: Open Interest Analysis (Critical)
|
|
66
|
+
|
|
61
67
|
**As a** derivatives trader
|
|
62
68
|
**I want to** track open interest changes by exchange and contract type
|
|
63
69
|
**So that** I can gauge market positioning and trend strength
|
|
64
70
|
|
|
65
71
|
**Acceptance Criteria**:
|
|
72
|
+
|
|
66
73
|
- Show total OI in USD and BTC/ETH equivalent
|
|
67
74
|
- Display 24h, 7d, 30d OI changes
|
|
68
75
|
- Compare OI across exchanges (market share)
|
|
69
76
|
- Analyze OI vs price divergences
|
|
70
77
|
|
|
71
78
|
### US-3: Liquidation Monitoring (Critical)
|
|
79
|
+
|
|
72
80
|
**As a** derivatives trader
|
|
73
81
|
**I want to** see liquidation levels and recent liquidation events
|
|
74
82
|
**So that** I can avoid cascade zones and position for liquidation-driven moves
|
|
75
83
|
|
|
76
84
|
**Acceptance Criteria**:
|
|
85
|
+
|
|
77
86
|
- Display liquidation heatmap with price levels
|
|
78
87
|
- Show recent large liquidations (>$100K)
|
|
79
88
|
- Calculate long/short liquidation zones
|
|
80
89
|
- Estimate cascade risk at key levels
|
|
81
90
|
|
|
82
91
|
### US-4: Basis Tracking (High)
|
|
92
|
+
|
|
83
93
|
**As a** basis arbitrageur
|
|
84
94
|
**I want to** see spot-futures basis across all expiries
|
|
85
95
|
**So that** I can identify cash-and-carry opportunities
|
|
86
96
|
|
|
87
97
|
**Acceptance Criteria**:
|
|
98
|
+
|
|
88
99
|
- Calculate perpetual-spot basis (real-time)
|
|
89
100
|
- Calculate quarterly-spot basis with annualized yield
|
|
90
101
|
- Compare basis across exchanges
|
|
91
102
|
- Signal when basis exceeds profitability threshold
|
|
92
103
|
|
|
93
104
|
### US-5: Options Flow Analysis (High)
|
|
105
|
+
|
|
94
106
|
**As an** options analyst
|
|
95
107
|
**I want to** track unusual options activity and positioning
|
|
96
108
|
**So that** I can identify smart money moves
|
|
97
109
|
|
|
98
110
|
**Acceptance Criteria**:
|
|
111
|
+
|
|
99
112
|
- Show large options trades (premium > $100K)
|
|
100
113
|
- Display put/call ratio by volume and OI
|
|
101
114
|
- Calculate max pain for upcoming expiries
|
|
102
115
|
- Analyze implied volatility levels and skew
|
|
103
116
|
|
|
104
117
|
### US-6: Multi-Asset Dashboard (Medium)
|
|
118
|
+
|
|
105
119
|
**As a** portfolio manager
|
|
106
120
|
**I want to** see derivatives metrics for multiple assets
|
|
107
121
|
**So that** I can monitor my entire derivatives exposure
|
|
108
122
|
|
|
109
123
|
**Acceptance Criteria**:
|
|
124
|
+
|
|
110
125
|
- Support BTC, ETH, SOL, and major altcoins
|
|
111
126
|
- Display comparative funding rates
|
|
112
127
|
- Show aggregate OI across assets
|
|
@@ -117,35 +132,41 @@ Manual monitoring is impractical given the 24/7 nature of crypto markets and the
|
|
|
117
132
|
## Functional Requirements
|
|
118
133
|
|
|
119
134
|
### REQ-1: Multi-Exchange Data Aggregation
|
|
135
|
+
|
|
120
136
|
- Fetch funding rates from Binance, Bybit, OKX, Deribit, BitMEX
|
|
121
137
|
- Aggregate open interest across exchanges
|
|
122
138
|
- Support both USDT-margined and coin-margined contracts
|
|
123
139
|
|
|
124
140
|
### REQ-2: Funding Rate Analysis
|
|
141
|
+
|
|
125
142
|
- Current funding rate with countdown to next payment
|
|
126
143
|
- Historical funding (24h, 7d, 30d averages)
|
|
127
144
|
- Funding arbitrage opportunities between exchanges
|
|
128
145
|
- Annualized funding yield calculation
|
|
129
146
|
|
|
130
147
|
### REQ-3: Open Interest Analytics
|
|
148
|
+
|
|
131
149
|
- Total OI by asset and exchange
|
|
132
150
|
- OI change tracking (1h, 24h, 7d)
|
|
133
151
|
- Long/short ratio by exchange
|
|
134
152
|
- OI vs price divergence detection
|
|
135
153
|
|
|
136
154
|
### REQ-4: Liquidation Intelligence
|
|
155
|
+
|
|
137
156
|
- Real-time liquidation tracking
|
|
138
157
|
- Liquidation heatmap generation
|
|
139
158
|
- Cascade risk estimation
|
|
140
159
|
- Historical liquidation analysis
|
|
141
160
|
|
|
142
161
|
### REQ-5: Options Market Data
|
|
162
|
+
|
|
143
163
|
- Implied volatility by strike and expiry
|
|
144
164
|
- Put/call ratio tracking
|
|
145
165
|
- Max pain calculation
|
|
146
166
|
- Options flow for large trades
|
|
147
167
|
|
|
148
168
|
### REQ-6: Basis Calculations
|
|
169
|
+
|
|
149
170
|
- Perpetual basis (funding-implied)
|
|
150
171
|
- Quarterly futures basis
|
|
151
172
|
- Annualized yield calculation
|
|
@@ -187,16 +208,19 @@ Manual monitoring is impractical given the 24/7 nature of crypto markets and the
|
|
|
187
208
|
## Risk Considerations
|
|
188
209
|
|
|
189
210
|
### Market Risks
|
|
211
|
+
|
|
190
212
|
- Funding rates can flip rapidly during volatility
|
|
191
213
|
- Liquidation cascades can gap through levels
|
|
192
214
|
- Options pricing models have limitations
|
|
193
215
|
|
|
194
216
|
### Data Risks
|
|
217
|
+
|
|
195
218
|
- Exchange API outages or rate limits
|
|
196
219
|
- Delayed or stale data during high volatility
|
|
197
220
|
- Inconsistent data formats between exchanges
|
|
198
221
|
|
|
199
222
|
### User Risks
|
|
223
|
+
|
|
200
224
|
- Over-reliance on signals without risk management
|
|
201
225
|
- Misinterpretation of complex derivatives metrics
|
|
202
226
|
- Leverage amplifies both gains and losses
|
|
@@ -206,6 +230,7 @@ Manual monitoring is impractical given the 24/7 nature of crypto markets and the
|
|
|
206
230
|
## Examples
|
|
207
231
|
|
|
208
232
|
### Example 1: Funding Rate Alert
|
|
233
|
+
|
|
209
234
|
```
|
|
210
235
|
User: "What's the funding rate for BTC?"
|
|
211
236
|
|
|
@@ -225,6 +250,7 @@ Arbitrage: None (rates aligned)
|
|
|
225
250
|
```
|
|
226
251
|
|
|
227
252
|
### Example 2: Liquidation Analysis
|
|
253
|
+
|
|
228
254
|
```
|
|
229
255
|
User: "Where are the BTC liquidation levels?"
|
|
230
256
|
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tracking-crypto-derivatives
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
description: 'Track cryptocurrency futures, options, and perpetual swaps with funding
|
|
4
|
+
rates, open interest, liquidations, and comprehensive derivatives market analysis.
|
|
5
|
+
|
|
6
|
+
Use when monitoring derivatives markets, analyzing funding rates, tracking open
|
|
7
|
+
interest, finding liquidation levels, or researching options flow.
|
|
8
|
+
|
|
9
|
+
Trigger with phrases like "funding rate", "open interest", "perpetual swap", "futures
|
|
10
|
+
basis", "liquidation levels", "options flow", "put call ratio", "derivatives analysis",
|
|
11
|
+
or "BTC perps".
|
|
12
|
+
|
|
13
|
+
'
|
|
7
14
|
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(crypto:derivatives-*)
|
|
8
15
|
version: 1.0.0
|
|
9
16
|
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
10
17
|
license: MIT
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
tags:
|
|
19
|
+
- crypto
|
|
20
|
+
- monitoring
|
|
21
|
+
- tracking-crypto
|
|
22
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
13
23
|
---
|
|
14
24
|
# Tracking Crypto Derivatives
|
|
15
25
|
|
|
@@ -29,27 +39,32 @@ Aggregate funding rates, open interest, liquidations, and options data across CE
|
|
|
29
39
|
## Instructions
|
|
30
40
|
|
|
31
41
|
1. **Check funding rates** across exchanges to identify sentiment and arbitrage opportunities:
|
|
42
|
+
|
|
32
43
|
```bash
|
|
33
44
|
python derivatives_tracker.py funding BTC
|
|
34
45
|
python derivatives_tracker.py funding BTC ETH SOL
|
|
35
46
|
python derivatives_tracker.py funding BTC --history 7d
|
|
36
47
|
```
|
|
48
|
+
|
|
37
49
|
- Positive funding (>0.01%): Longs pay shorts, bullish sentiment
|
|
38
50
|
- Negative funding (<-0.01%): Shorts pay longs, bearish sentiment
|
|
39
51
|
- Extreme funding (>0.1%): Potential contrarian opportunity
|
|
40
52
|
|
|
41
53
|
2. **Analyze open interest** to gauge market positioning and trend strength:
|
|
54
|
+
|
|
42
55
|
```bash
|
|
43
56
|
python derivatives_tracker.py oi BTC
|
|
44
57
|
python derivatives_tracker.py oi BTC --changes
|
|
45
58
|
python derivatives_tracker.py oi BTC --divergence
|
|
46
59
|
```
|
|
60
|
+
|
|
47
61
|
- Rising OI + Rising Price = strong bullish trend
|
|
48
62
|
- Rising OI + Falling Price = strong bearish trend
|
|
49
63
|
- Falling OI + Rising Price = short covering rally
|
|
50
64
|
- Falling OI + Falling Price = long liquidations
|
|
51
65
|
|
|
52
66
|
3. **Monitor liquidations** to find support/resistance clusters:
|
|
67
|
+
|
|
53
68
|
```bash
|
|
54
69
|
python derivatives_tracker.py liquidations BTC
|
|
55
70
|
python derivatives_tracker.py liquidations BTC --recent
|
|
@@ -57,6 +72,7 @@ Aggregate funding rates, open interest, liquidations, and options data across CE
|
|
|
57
72
|
```
|
|
58
73
|
|
|
59
74
|
4. **Analyze options market** for IV, put/call ratio, and max pain:
|
|
75
|
+
|
|
60
76
|
```bash
|
|
61
77
|
python derivatives_tracker.py options BTC
|
|
62
78
|
python derivatives_tracker.py options BTC --pcr
|
|
@@ -64,6 +80,7 @@ Aggregate funding rates, open interest, liquidations, and options data across CE
|
|
|
64
80
|
```
|
|
65
81
|
|
|
66
82
|
5. **Calculate basis** for spot-futures arbitrage opportunities:
|
|
83
|
+
|
|
67
84
|
```bash
|
|
68
85
|
python derivatives_tracker.py basis BTC
|
|
69
86
|
python derivatives_tracker.py basis BTC --quarterly
|
|
@@ -71,6 +88,7 @@ Aggregate funding rates, open interest, liquidations, and options data across CE
|
|
|
71
88
|
```
|
|
72
89
|
|
|
73
90
|
6. **Run full dashboard** for comprehensive derivatives overview:
|
|
91
|
+
|
|
74
92
|
```bash
|
|
75
93
|
python derivatives_tracker.py dashboard BTC
|
|
76
94
|
python derivatives_tracker.py dashboard BTC ETH SOL
|
|
@@ -100,21 +118,25 @@ See `${CLAUDE_SKILL_DIR}/references/implementation.md` for detailed output forma
|
|
|
100
118
|
## Examples
|
|
101
119
|
|
|
102
120
|
**Morning derivatives check** - Scan funding, OI, and liquidations for top assets:
|
|
121
|
+
|
|
103
122
|
```bash
|
|
104
123
|
python derivatives_tracker.py dashboard BTC ETH SOL
|
|
105
124
|
```
|
|
106
125
|
|
|
107
126
|
**Funding rate arbitrage** - Alert when funding exceeds threshold for cash-and-carry:
|
|
127
|
+
|
|
108
128
|
```bash
|
|
109
129
|
python derivatives_tracker.py funding BTC --alert-threshold 0.08
|
|
110
130
|
```
|
|
111
131
|
|
|
112
132
|
**Pre-expiry options analysis** - Check max pain and IV before Friday expiry:
|
|
133
|
+
|
|
113
134
|
```bash
|
|
114
135
|
python derivatives_tracker.py options BTC --expiry friday
|
|
115
136
|
```
|
|
116
137
|
|
|
117
138
|
**Basis trading scan** - Find all pairs with annualized yield above 5%:
|
|
139
|
+
|
|
118
140
|
```bash
|
|
119
141
|
python derivatives_tracker.py basis --all --min-yield 5 # 5 = minimum annualized yield %
|
|
120
142
|
```
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
### Authentication Failures
|
|
6
6
|
|
|
7
7
|
**API Key Invalid**
|
|
8
|
+
|
|
8
9
|
- Error: `Invalid API key` or `Signature mismatch`
|
|
9
10
|
- Causes: Expired key, wrong permissions, clock drift
|
|
10
11
|
- Solution:
|
|
@@ -14,12 +15,14 @@
|
|
|
14
15
|
4. Check key has futures/derivatives permissions
|
|
15
16
|
|
|
16
17
|
**IP Whitelist Rejected**
|
|
18
|
+
|
|
17
19
|
- Error: `IP not in whitelist`
|
|
18
20
|
- Solution: Add current IP to exchange API settings or remove whitelist restriction
|
|
19
21
|
|
|
20
22
|
### Rate Limiting
|
|
21
23
|
|
|
22
24
|
**Too Many Requests**
|
|
25
|
+
|
|
23
26
|
- Error: `429 Too Many Requests` or `Rate limit exceeded`
|
|
24
27
|
- Threshold varies by exchange:
|
|
25
28
|
- Binance: 1200 requests/minute (weighted)
|
|
@@ -33,6 +36,7 @@
|
|
|
33
36
|
4. Batch requests where possible
|
|
34
37
|
|
|
35
38
|
**Weight Exceeded**
|
|
39
|
+
|
|
36
40
|
- Error: `Request weight exceeded`
|
|
37
41
|
- Solution: Some endpoints cost more weight; use lightweight endpoints or wait
|
|
38
42
|
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
### Missing or Stale Data
|
|
42
46
|
|
|
43
47
|
**No Data Available**
|
|
48
|
+
|
|
44
49
|
- Error: `No funding data available for {symbol}`
|
|
45
50
|
- Causes: Symbol not listed, exchange down, maintenance
|
|
46
51
|
- Solution:
|
|
@@ -50,6 +55,7 @@
|
|
|
50
55
|
4. Use mock data for testing
|
|
51
56
|
|
|
52
57
|
**Stale Timestamp**
|
|
58
|
+
|
|
53
59
|
- Error: Data timestamp older than expected
|
|
54
60
|
- Solution:
|
|
55
61
|
1. Check WebSocket connection alive
|
|
@@ -60,10 +66,12 @@
|
|
|
60
66
|
### Invalid Values
|
|
61
67
|
|
|
62
68
|
**Negative Funding Rate**
|
|
69
|
+
|
|
63
70
|
- Not an error - negative funding is valid (shorts pay longs)
|
|
64
71
|
- Just ensure your calculations handle negative correctly
|
|
65
72
|
|
|
66
73
|
**Zero Open Interest**
|
|
74
|
+
|
|
67
75
|
- May indicate:
|
|
68
76
|
- New symbol with no positions
|
|
69
77
|
- Data not yet populated
|
|
@@ -71,6 +79,7 @@
|
|
|
71
79
|
- Solution: Filter out or flag as incomplete
|
|
72
80
|
|
|
73
81
|
**Implausible Values**
|
|
82
|
+
|
|
74
83
|
- Funding rate > 10% per 8h → likely data error
|
|
75
84
|
- IV > 500% → verify or exclude
|
|
76
85
|
- Solution: Implement sanity checks and outlier filtering
|
|
@@ -80,9 +89,11 @@
|
|
|
80
89
|
### Division by Zero
|
|
81
90
|
|
|
82
91
|
**Empty Exchange List**
|
|
92
|
+
|
|
83
93
|
- Error: `Division by zero` in weighted average
|
|
84
94
|
- Cause: No exchanges returned data
|
|
85
95
|
- Solution:
|
|
96
|
+
|
|
86
97
|
```python
|
|
87
98
|
if not exchanges:
|
|
88
99
|
raise ValueError("No exchange data available")
|
|
@@ -94,8 +105,10 @@ if total == 0:
|
|
|
94
105
|
### Decimal Precision
|
|
95
106
|
|
|
96
107
|
**Precision Loss**
|
|
108
|
+
|
|
97
109
|
- Error: Incorrect basis calculations due to floating point
|
|
98
110
|
- Solution: Use `Decimal` for all price/rate calculations
|
|
111
|
+
|
|
99
112
|
```python
|
|
100
113
|
from decimal import Decimal, ROUND_HALF_UP
|
|
101
114
|
basis = (futures - spot) / spot
|
|
@@ -105,9 +118,11 @@ basis_pct = float(basis.quantize(Decimal('0.0001')))
|
|
|
105
118
|
### Date Handling
|
|
106
119
|
|
|
107
120
|
**Invalid Expiry Format**
|
|
121
|
+
|
|
108
122
|
- Error: `strptime` fails on expiry string
|
|
109
123
|
- Cause: Different exchange formats (YYYYMMDD vs YYYY-MM-DD)
|
|
110
124
|
- Solution:
|
|
125
|
+
|
|
111
126
|
```python
|
|
112
127
|
formats = ['%Y-%m-%d', '%Y%m%d', '%d%b%y']
|
|
113
128
|
for fmt in formats:
|
|
@@ -119,6 +134,7 @@ raise ValueError(f"Unknown expiry format: {expiry}")
|
|
|
119
134
|
```
|
|
120
135
|
|
|
121
136
|
**Expiry Already Passed**
|
|
137
|
+
|
|
122
138
|
- Warning: Analyzing expired contract
|
|
123
139
|
- Solution: Filter to active expiries only
|
|
124
140
|
|
|
@@ -127,6 +143,7 @@ raise ValueError(f"Unknown expiry format: {expiry}")
|
|
|
127
143
|
### Connection Failures
|
|
128
144
|
|
|
129
145
|
**Connection Timeout**
|
|
146
|
+
|
|
130
147
|
- Error: `Connection timed out`
|
|
131
148
|
- Solution:
|
|
132
149
|
1. Increase timeout: `timeout=30`
|
|
@@ -135,6 +152,7 @@ raise ValueError(f"Unknown expiry format: {expiry}")
|
|
|
135
152
|
4. Check network connectivity
|
|
136
153
|
|
|
137
154
|
**SSL Certificate Error**
|
|
155
|
+
|
|
138
156
|
- Error: `SSL: CERTIFICATE_VERIFY_FAILED`
|
|
139
157
|
- Solution:
|
|
140
158
|
1. Update CA certificates
|
|
@@ -143,6 +161,7 @@ raise ValueError(f"Unknown expiry format: {expiry}")
|
|
|
143
161
|
### WebSocket Issues
|
|
144
162
|
|
|
145
163
|
**Disconnected**
|
|
164
|
+
|
|
146
165
|
- Error: WebSocket connection closed unexpectedly
|
|
147
166
|
- Solution:
|
|
148
167
|
1. Implement reconnection logic
|
|
@@ -201,22 +220,27 @@ def record_failure(exchange):
|
|
|
201
220
|
## Common Issues by Exchange
|
|
202
221
|
|
|
203
222
|
### Binance
|
|
223
|
+
|
|
204
224
|
- Issue: Weight limits are complex (different endpoints cost different)
|
|
205
225
|
- Solution: Track weight counter from response headers
|
|
206
226
|
|
|
207
227
|
### Bybit
|
|
228
|
+
|
|
208
229
|
- Issue: V5 API has different structure than V3
|
|
209
230
|
- Solution: Use unified V5 endpoints consistently
|
|
210
231
|
|
|
211
232
|
### OKX
|
|
233
|
+
|
|
212
234
|
- Issue: Requires specific headers for authentication
|
|
213
235
|
- Solution: Include `OK-ACCESS-*` headers correctly
|
|
214
236
|
|
|
215
237
|
### Deribit
|
|
238
|
+
|
|
216
239
|
- Issue: Options data requires authentication
|
|
217
240
|
- Solution: Use API key even for read-only data
|
|
218
241
|
|
|
219
242
|
### BitMEX
|
|
243
|
+
|
|
220
244
|
- Issue: Rate limits are very strict
|
|
221
245
|
- Solution: Aggressive caching, minimal polling
|
|
222
246
|
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
### Funding Rate Analysis
|
|
6
6
|
|
|
7
7
|
**Basic funding rate check:**
|
|
8
|
+
|
|
8
9
|
```bash
|
|
9
10
|
python derivatives_tracker.py funding BTC
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
Output:
|
|
14
|
+
|
|
13
15
|
```
|
|
14
16
|
======================================================================
|
|
15
17
|
BTC FUNDING RATE ANALYSIS
|
|
@@ -32,6 +34,7 @@ Sentiment: 🟢 Moderate Bullish
|
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
**JSON export:**
|
|
37
|
+
|
|
35
38
|
```bash
|
|
36
39
|
python derivatives_tracker.py funding BTC --format json
|
|
37
40
|
```
|
|
@@ -39,11 +42,13 @@ python derivatives_tracker.py funding BTC --format json
|
|
|
39
42
|
### Open Interest Analysis
|
|
40
43
|
|
|
41
44
|
**Basic OI check:**
|
|
45
|
+
|
|
42
46
|
```bash
|
|
43
47
|
python derivatives_tracker.py oi BTC
|
|
44
48
|
```
|
|
45
49
|
|
|
46
50
|
Output:
|
|
51
|
+
|
|
47
52
|
```
|
|
48
53
|
======================================================================
|
|
49
54
|
BTC OPEN INTEREST ANALYSIS
|
|
@@ -68,11 +73,13 @@ Dominant Exchange: Binance (41.3%)
|
|
|
68
73
|
```
|
|
69
74
|
|
|
70
75
|
**With divergence analysis:**
|
|
76
|
+
|
|
71
77
|
```bash
|
|
72
78
|
python derivatives_tracker.py oi BTC --price-change 3.5
|
|
73
79
|
```
|
|
74
80
|
|
|
75
81
|
Output includes:
|
|
82
|
+
|
|
76
83
|
```
|
|
77
84
|
────────────────────────────────────────────────────────────────────────
|
|
78
85
|
DIVERGENCE ANALYSIS
|
|
@@ -89,11 +96,13 @@ DIVERGENCE ANALYSIS
|
|
|
89
96
|
### Liquidation Monitoring
|
|
90
97
|
|
|
91
98
|
**Basic liquidation summary:**
|
|
99
|
+
|
|
92
100
|
```bash
|
|
93
101
|
python derivatives_tracker.py liquidations BTC
|
|
94
102
|
```
|
|
95
103
|
|
|
96
104
|
Output:
|
|
105
|
+
|
|
97
106
|
```
|
|
98
107
|
======================================================================
|
|
99
108
|
BTC LIQUIDATION MONITOR
|
|
@@ -127,11 +136,13 @@ SHORT LIQUIDATIONS (above $67,500):
|
|
|
127
136
|
```
|
|
128
137
|
|
|
129
138
|
**With large liquidation history:**
|
|
139
|
+
|
|
130
140
|
```bash
|
|
131
141
|
python derivatives_tracker.py liquidations BTC --large
|
|
132
142
|
```
|
|
133
143
|
|
|
134
144
|
Adds:
|
|
145
|
+
|
|
135
146
|
```
|
|
136
147
|
────────────────────────────────────────────────────────────────────────
|
|
137
148
|
RECENT LARGE LIQUIDATIONS (>$1M)
|
|
@@ -147,11 +158,13 @@ OKX short $68,100 $2.9M 2h ago
|
|
|
147
158
|
### Options Analysis
|
|
148
159
|
|
|
149
160
|
**Basic options summary:**
|
|
161
|
+
|
|
150
162
|
```bash
|
|
151
163
|
python derivatives_tracker.py options BTC
|
|
152
164
|
```
|
|
153
165
|
|
|
154
166
|
Output:
|
|
167
|
+
|
|
155
168
|
```
|
|
156
169
|
======================================================================
|
|
157
170
|
BTC OPTIONS ANALYSIS
|
|
@@ -183,6 +196,7 @@ Expiry Pressure: LOW
|
|
|
183
196
|
```
|
|
184
197
|
|
|
185
198
|
**With max pain levels and options flow:**
|
|
199
|
+
|
|
186
200
|
```bash
|
|
187
201
|
python derivatives_tracker.py options BTC --max-pain --flow
|
|
188
202
|
```
|
|
@@ -190,11 +204,13 @@ python derivatives_tracker.py options BTC --max-pain --flow
|
|
|
190
204
|
### Basis Analysis
|
|
191
205
|
|
|
192
206
|
**Basic basis/spread check:**
|
|
207
|
+
|
|
193
208
|
```bash
|
|
194
209
|
python derivatives_tracker.py basis BTC
|
|
195
210
|
```
|
|
196
211
|
|
|
197
212
|
Output:
|
|
213
|
+
|
|
198
214
|
```
|
|
199
215
|
======================================================================
|
|
200
216
|
BTC BASIS ANALYSIS
|
|
@@ -226,6 +242,7 @@ TERM STRUCTURE
|
|
|
226
242
|
```
|
|
227
243
|
|
|
228
244
|
**With carry trade scanner:**
|
|
245
|
+
|
|
229
246
|
```bash
|
|
230
247
|
python derivatives_tracker.py basis BTC --carry
|
|
231
248
|
```
|
|
@@ -233,11 +250,13 @@ python derivatives_tracker.py basis BTC --carry
|
|
|
233
250
|
### Multi-Asset Dashboard
|
|
234
251
|
|
|
235
252
|
**Quick market overview:**
|
|
253
|
+
|
|
236
254
|
```bash
|
|
237
255
|
python derivatives_tracker.py dashboard BTC ETH SOL
|
|
238
256
|
```
|
|
239
257
|
|
|
240
258
|
Output:
|
|
259
|
+
|
|
241
260
|
```
|
|
242
261
|
======================================================================
|
|
243
262
|
CRYPTO DERIVATIVES DASHBOARD
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Detailed Output Formats
|
|
4
4
|
|
|
5
5
|
### Funding Rate Report
|
|
6
|
+
|
|
6
7
|
```
|
|
7
8
|
BTC PERPETUAL FUNDING RATES
|
|
8
9
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -18,6 +19,7 @@ Sentiment: Moderately Bullish
|
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
### Open Interest Report
|
|
22
|
+
|
|
21
23
|
```
|
|
22
24
|
BTC OPEN INTEREST ANALYSIS
|
|
23
25
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -34,6 +36,7 @@ Long/Short Ratio: 1.15 (53.5% long)
|
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### Liquidation Heatmap
|
|
39
|
+
|
|
37
40
|
```
|
|
38
41
|
BTC LIQUIDATION LEVELS
|
|
39
42
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -55,6 +58,7 @@ SHORT LIQUIDATIONS (above):
|
|
|
55
58
|
## Options Analysis Deep Dive
|
|
56
59
|
|
|
57
60
|
### Options Commands
|
|
61
|
+
|
|
58
62
|
```bash
|
|
59
63
|
# Get options overview
|
|
60
64
|
python derivatives_tracker.py options BTC
|
|
@@ -70,6 +74,7 @@ python derivatives_tracker.py options BTC --flow
|
|
|
70
74
|
```
|
|
71
75
|
|
|
72
76
|
### Options Insights
|
|
77
|
+
|
|
73
78
|
- **High IV rank** (>80): Options expensive, consider selling
|
|
74
79
|
- **Low IV rank** (<20): Options cheap, consider buying
|
|
75
80
|
- **Max pain**: Price where most options expire worthless
|
|
@@ -77,6 +82,7 @@ python derivatives_tracker.py options BTC --flow
|
|
|
77
82
|
## Basis Trading Guide
|
|
78
83
|
|
|
79
84
|
### Basis Commands
|
|
85
|
+
|
|
80
86
|
```bash
|
|
81
87
|
# Get spot-perp basis
|
|
82
88
|
python derivatives_tracker.py basis BTC
|
|
@@ -89,6 +95,7 @@ python derivatives_tracker.py basis --all
|
|
|
89
95
|
```
|
|
90
96
|
|
|
91
97
|
### Basis Trading Interpretation
|
|
98
|
+
|
|
92
99
|
- **Positive basis**: Futures > Spot (contango, normal)
|
|
93
100
|
- **Negative basis**: Futures < Spot (backwardation)
|
|
94
101
|
- **Cash-and-carry**: Buy spot + sell futures when basis high
|
|
@@ -104,6 +111,7 @@ python derivatives_tracker.py basis --all
|
|
|
104
111
|
## Risk Warning
|
|
105
112
|
|
|
106
113
|
Derivatives are leveraged instruments with high risk of loss.
|
|
114
|
+
|
|
107
115
|
- Funding costs accumulate over time
|
|
108
116
|
- Liquidations can happen rapidly
|
|
109
117
|
- Options can expire worthless
|