shreexOp Prices Chart
Updated 2022-12-23
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with prices as (
select
hour,
price
from optimism.core.fact_hourly_token_prices where token_address='0x4200000000000000000000000000000000000042' and symbol='OP'
ORDER by hour
)
select
hour::date as date,
avg(price) as op_price,
max(price) as max_price,
min(price) as min_price,
max_price-min_price as volatility,
avg(op_price) OVER (ORDER BY date ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) AS moving_average_30,
avg(op_price) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS moving_average_7
from prices
group by date
order by date
--0x4200000000000000000000000000000000000042 18 DECimal
Run a query to Download Data