Aggregating Options Data
Last updated
Last updated
This notebook demonstrates basic functionality offered by the Coin Metrics Python API Client and Market Data Feed.
Coin Metrics offers a vast assortment of data for hundreds of cryptoassets. The Python API Client allows for easy access to this data using Python without needing to create your own wrappers using requests
and other such libraries.
To understand the data that Coin Metrics offers, feel free to peruse the resources below.
The Coin Metrics API v4 website contains the full set of endpoints and data offered by Coin Metrics.
The Coin Metrics Product Documentation gives detailed, conceptual explanations of the data that Coin Metrics offers.
The API Spec contains a full list of functions.
Download the entire notebook as either a jupyter notebook to run yourself or as a pdf from the two links below
To simplify some of the complexity around options contract size, we will investigate only options markets on Deribit, the largest options exchange by volume.
0
deribit-ETH-10APR20-100-P-option
deribit
option
eth
usd
eth-usd
ETH-10APR20-100-P
eth
100
put
...
2020-03-26T08:00:02.000000000Z
2020-04-10T08:00:00.000000000Z
158.1
offline
1
0.0005
0.0004
0.0004
NaN
NaN
1
deribit-ETH-10APR20-110-P-option
deribit
option
eth
usd
eth-usd
ETH-10APR20-110-P
eth
110
put
...
2020-03-26T08:00:02.000000000Z
2020-04-10T08:00:00.000000000Z
158.1
offline
1
0.0005
0.0004
0.0004
NaN
NaN
2
deribit-ETH-10APR20-120-C-option
deribit
option
eth
usd
eth-usd
ETH-10APR20-120-C
eth
120
call
...
2020-03-26T08:00:02.000000000Z
2020-04-10T08:00:00.000000000Z
158.1
offline
1
0.0005
0.0004
0.0004
NaN
NaN
3
deribit-ETH-10APR20-120-P-option
deribit
option
eth
usd
eth-usd
ETH-10APR20-120-P
eth
120
put
...
2020-03-26T08:00:02.000000000Z
2020-04-10T08:00:00.000000000Z
158.1
offline
1
0.0005
0.0004
0.0004
NaN
NaN
4
deribit-ETH-10APR20-130-C-option
deribit
option
eth
usd
eth-usd
ETH-10APR20-130-C
eth
130
call
...
2020-03-26T08:00:02.000000000Z
2020-04-10T08:00:00.000000000Z
158.1
offline
1
0.0005
0.0004
0.0004
NaN
NaN
5 rows × 22 columns
2384
deribit-ETH-10SEP24-1950-C-option
deribit
option
eth
usd
eth-usd
ETH-10SEP24-1950-C
eth
1950
call
...
2024-09-07 08:00:09+00:00
2024-09-10 08:00:00+00:00
2360.48
offline
1
0.0001
0.0003
0.0003
ETH
USD
2385
deribit-ETH-10SEP24-1950-P-option
deribit
option
eth
usd
eth-usd
ETH-10SEP24-1950-P
eth
1950
put
...
2024-09-07 08:00:09+00:00
2024-09-10 08:00:00+00:00
2360.48
offline
1
0.0001
0.0003
0.0003
ETH
USD
2386
deribit-ETH-10SEP24-2000-C-option
deribit
option
eth
usd
eth-usd
ETH-10SEP24-2000-C
eth
2000
call
...
2024-09-07 08:00:09+00:00
2024-09-10 08:00:00+00:00
2360.48
offline
1
0.0001
0.0003
0.0003
ETH
USD
2387
deribit-ETH-10SEP24-2000-P-option
deribit
option
eth
usd
eth-usd
ETH-10SEP24-2000-P
eth
2000
put
...
2024-09-07 08:00:09+00:00
2024-09-10 08:00:00+00:00
2360.48
offline
1
0.0001
0.0003
0.0003
ETH
USD
2388
deribit-ETH-10SEP24-2050-C-option
deribit
option
eth
usd
eth-usd
ETH-10SEP24-2050-C
eth
2050
call
...
2024-09-07 08:00:09+00:00
2024-09-10 08:00:00+00:00
2360.48
offline
1
0.0001
0.0003
0.0003
ETH
USD
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
74822
deribit-ETH-9SEP24-2800-P-option
deribit
option
eth
usd
eth-usd
ETH-9SEP24-2800-P
eth
2800
put
...
2024-09-06 08:00:10+00:00
2024-09-09 08:00:00+00:00
2311.75
offline
1
0.0001
0.0003
0.0003
ETH
USD
74823
deribit-ETH-9SEP24-2850-C-option
deribit
option
eth
usd
eth-usd
ETH-9SEP24-2850-C
eth
2850
call
...
2024-09-06 08:00:10+00:00
2024-09-09 08:00:00+00:00
2311.75
offline
1
0.0001
0.0003
0.0003
ETH
USD
74824
deribit-ETH-9SEP24-2850-P-option
deribit
option
eth
usd
eth-usd
ETH-9SEP24-2850-P
eth
2850
put
...
2024-09-06 08:00:10+00:00
2024-09-09 08:00:00+00:00
2311.75
offline
1
0.0001
0.0003
0.0003
ETH
USD
74825
deribit-ETH-9SEP24-2900-C-option
deribit
option
eth
usd
eth-usd
ETH-9SEP24-2900-C
eth
2900
call
...
2024-09-06 10:37:00+00:00
2024-09-09 08:00:00+00:00
2311.75
offline
1
0.0001
0.0003
0.0003
ETH
USD
74826
deribit-ETH-9SEP24-2900-P-option
deribit
option
eth
usd
eth-usd
ETH-9SEP24-2900-P
eth
2900
put
...
2024-09-06 10:37:00+00:00
2024-09-09 08:00:00+00:00
2311.75
offline
1
0.0001
0.0003
0.0003
ETH
USD
376 rows × 22 columns
On Deribit, each option contract provides notional exposure to 1 unit of the underlying asset (i.e. 1 BTC or 1 ETH). To calculate options volume, we must multiply the 'amount' field (representing the number of contracts traded) by the USD price of the underlying asset.
1071
deribit-ETH-3SEP24-2375-P-option
2024-09-01 06:55:13.947000+00:00
1
1072
deribit-ETH-3SEP24-2375-P-option
2024-09-01 08:04:42.145000+00:00
1
1073
deribit-ETH-3SEP24-2375-P-option
2024-09-01 08:07:41.254000+00:00
3
2429
deribit-ETH-4SEP24-2550-C-option
2024-09-01 08:33:21.911000+00:00
1
2805
deribit-ETH-4SEP24-2700-C-option
2024-09-01 08:47:26.803000+00:00
14
...
...
...
...
11208
deribit-ETH-9SEP24-2300-C-option
2024-09-07 23:54:16.170000+00:00
9
9225
deribit-ETH-8SEP24-2325-C-option
2024-09-07 23:54:52.991000+00:00
2
8166
deribit-ETH-8SEP24-2050-P-option
2024-09-07 23:57:33.509000+00:00
2
9650
deribit-ETH-8SEP24-2400-C-option
2024-09-07 23:58:04.697000+00:00
1
9651
deribit-ETH-8SEP24-2400-C-option
2024-09-07 23:58:53.038000+00:00
1
10824 rows × 3 columns
time
2024-09-01 00:00:00+00:00
2512.79
2024-09-01 00:01:00+00:00
2512.41
2024-09-01 00:02:00+00:00
2510.65
2024-09-01 00:03:00+00:00
2513.37
2024-09-01 00:04:00+00:00
2511.32
...
...
2024-09-08 23:55:00+00:00
2298.15
2024-09-08 23:56:00+00:00
2297.49
2024-09-08 23:57:00+00:00
2294.79
2024-09-08 23:58:00+00:00
2296.77
2024-09-08 23:59:00+00:00
2298.61
11520 rows × 1 columns
0
deribit-ETH-10SEP24-1950-P-option
2024-09-07 09:06:00+00:00
5
2293.8
11469.0
1
deribit-ETH-10SEP24-1950-P-option
2024-09-07 09:43:00+00:00
10
2279.45
22794.5
2
deribit-ETH-10SEP24-1950-P-option
2024-09-07 09:43:00+00:00
9
2279.45
20515.05
3
deribit-ETH-10SEP24-1950-P-option
2024-09-07 09:43:00+00:00
1
2279.45
2279.45
4
deribit-ETH-10SEP24-1950-P-option
2024-09-07 11:42:00+00:00
5
2285.0
11425.0
...
...
...
...
...
...
10819
deribit-ETH-9SEP24-2750-C-option
2024-09-06 17:38:00+00:00
1
2235.41
2235.41
10820
deribit-ETH-9SEP24-2750-C-option
2024-09-07 17:02:00+00:00
5
2288.46
11442.3
10821
deribit-ETH-9SEP24-2750-C-option
2024-09-07 18:21:00+00:00
45
2278.46
102530.7
10822
deribit-ETH-9SEP24-2750-C-option
2024-09-07 18:21:00+00:00
23
2278.46
52404.58
10823
deribit-ETH-9SEP24-2800-P-option
2024-09-06 17:37:00+00:00
1
2233.79
2233.79
10824 rows × 5 columns
time
2024-09-01 00:00:00+00:00
5424658.14
2024-09-02 00:00:00+00:00
19562749.43
2024-09-03 00:00:00+00:00
40646881.35
2024-09-04 00:00:00+00:00
63609486.54
2024-09-05 00:00:00+00:00
44657679.33
2024-09-06 00:00:00+00:00
158263998.37
2024-09-07 00:00:00+00:00
44401580.5
Open interest represents the number of contracts that are currently outstanding and not settled for a specific derivatives market.
0
deribit-ETH-10SEP24-1950-C-option
2024-09-07 08:00:00+00:00
0
0.0
2024-09-07 08:00:19.312717+00:00
2024-09-07 08:00:00+00:00
call
1
deribit-ETH-10SEP24-1950-P-option
2024-09-07 08:00:00+00:00
0
0.0
2024-09-07 08:00:18.188738+00:00
2024-09-07 08:00:00+00:00
put
2
deribit-ETH-10SEP24-2000-C-option
2024-09-07 08:00:00+00:00
0
0.0
2024-09-07 08:00:18.188738+00:00
2024-09-07 08:00:00+00:00
call
3
deribit-ETH-10SEP24-2000-P-option
2024-09-07 08:00:00+00:00
0
0.0
2024-09-07 08:00:18.708225+00:00
2024-09-07 08:00:00+00:00
put
4
deribit-ETH-10SEP24-2050-C-option
2024-09-07 08:00:00+00:00
0
0.0
2024-09-07 08:00:18.708225+00:00
2024-09-07 08:00:00+00:00
call
...
...
...
...
...
...
...
...
2529
deribit-ETH-9SEP24-2800-P-option
2024-09-08 04:00:00+00:00
1
2285.35
2024-09-08 04:00:06.461248+00:00
2024-09-08 04:00:00+00:00
put
2530
deribit-ETH-9SEP24-2850-C-option
2024-09-08 04:00:00+00:00
0
0.0
2024-09-08 04:00:01.855497+00:00
2024-09-08 04:00:00+00:00
call
2531
deribit-ETH-9SEP24-2850-P-option
2024-09-08 04:00:00+00:00
0
0.0
2024-09-08 04:00:03.353208+00:00
2024-09-08 04:00:00+00:00
put
2532
deribit-ETH-9SEP24-2900-C-option
2024-09-08 04:00:00+00:00
0
0.0
2024-09-08 04:00:04.393566+00:00
2024-09-08 04:00:00+00:00
call
2533
deribit-ETH-9SEP24-2900-P-option
2024-09-08 04:00:00+00:00
0
0.0
2024-09-08 04:00:02.869006+00:00
2024-09-08 04:00:00+00:00
put
2534 rows × 7 columns
time
2024-09-01 00:00:00+00:00
0.0
0.0
2024-09-02 00:00:00+00:00
4987937.59
1479674.74
2024-09-03 00:00:00+00:00
14177673.6
10750076.42
2024-09-04 00:00:00+00:00
30418324.31
24904996.28
2024-09-05 00:00:00+00:00
37814891.94
21491107.77
2024-09-06 00:00:00+00:00
24772293.7
27150262.1
2024-09-07 00:00:00+00:00
73624086.44
70484677.82
2024-09-08 00:00:00+00:00
61750871.09
60518547.4
time
2024-09-01 00:00:00+00:00
NaN
2024-09-02 00:00:00+00:00
0.296651
2024-09-03 00:00:00+00:00
0.75824
2024-09-04 00:00:00+00:00
0.81875
2024-09-05 00:00:00+00:00
0.568324
2024-09-06 00:00:00+00:00
1.095993
2024-09-07 00:00:00+00:00
0.957359
2024-09-08 00:00:00+00:00
0.980044