Skip to content
Dune Analytics

@slash125 / Volume of active options - ETH

Volume of active options - ETH

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query

1WITH active AS
2  (WITH tmp AS
3     (WITH total_ex_exercised AS
4        (SELECT *
5         FROM
6           (SELECT *,
7                   call_block_time AS call_block_time_total
8            FROM hegic."HegicETHOptions_call_create"
9            WHERE call_success = 'true') total
10         FULL OUTER JOIN
11           (SELECT *
12            FROM hegic."HegicETHOptions_call_exercise"
13            WHERE call_success = 'true') exercised ON total."output_optionID" = exercised."optionID") SELECT call_block_time_total,
14                                                                                                             period,
15                                                                                                             "optionType", amount
16      FROM total_ex_exercised
17      WHERE "optionID" IS NULL) SELECT call_block_time_total + interval '1 days' AS expiration_date,
18                                                                        *
19   FROM tmp
20   WHERE period = 86400.00
21   UNION SELECT call_block_time_total + interval '7 days' AS expiration_date,
22                                                 *
23   FROM tmp
24   WHERE period = 604800.00
25   UNION SELECT call_block_time_total + interval '14 days' AS expiration_date,...

SQL query results

Loading