Skip to content
Dune Analytics

@slash125 / Fork of (#13764) New Query

SQL query

1WITH active as (
2
3
4WITH cre as (SELECT account, call_block_time AS "Date",
5          cast(c."output_optionID" AS int) AS "ID",
6   
7          (CASE
8               WHEN "optionType" = '1' THEN 'put'
9               ELSE 'call'
10           END) AS "type",
11          amount/10e17 AS "Size",
12          ("totalFee" - "settlementFee")/10e17 AS "Premium",
13          strike/10e7 AS "Strike",
14          (CASE
15               WHEN period = 86400.00 THEN date_trunc('minute', call_block_time) + interval '1 days'
16               WHEN period = 604800.00 THEN date_trunc('minute', call_block_time) + interval '7 days'
17               WHEN period = 1209600.00 THEN date_trunc('minute', call_block_time) + interval '14 days'
18               WHEN period = 1814400.00 THEN date_trunc('minute', call_block_time) + interval '21 days'
19               ELSE date_trunc('minute', call_block_time) + interval '28 days'
20           END) AS "Expiration Date",
21          call_tx_hash AS "tx hash",
22          call_block_time
23FROM hegic."HegicETHOptions_call_create" c
24JOIN hegic."HegicETHOptions_evt_Create" e ON c.call_tx_hash = e.evt_tx_hash
25WHERE call_success = true...

SQL query results

Loading