wxyz-erprices stETH
Updated 2023-01-13Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
›
⌄
with cb as (
-- 0xbe9895146f7af43049ca1c1ae358b0541ea49704
select
hour,
avg(price) as cbeth_price,
max(price) as max_price,
min(price) as min_price
from ethereum.core.fact_hourly_token_prices where token_address='0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
group by hour
),
eth as (
select
date_trunc('hour',block_timestamp) as hour,
avg(latest_answer_unadj/10e7) as eth_price
from ethereum.chainlink.ez_oracle_feeds where feed_name = 'ETH / USD' and hour >= '2022-08-24'
GROUP BY hour
ORDER BY hour
)
select
cb.hour,
eth_price,
cbeth_price as steth_price,
cbeth_price-eth_price as peg,
max_price
from eth,cb where cb.hour=eth.hour
Run a query to Download Data