hbd1994Test 04
Updated 2023-10-28
999
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
28
29
30
31
32
33
34
35
36
›
⌄
with USDC_prices as (
select
hour,
case
when symbol = 'USDC' then 'aBasUSDbC'
end as symbol,
price
from ethereum.price.ez_hourly_token_prices
where symbol in ('USDC')
and hour >= '2023-08-22'),
weth_current as (SELECT
resp:data:weth:usd as weth_current_price
from (SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/simple/price?ids=weth&vs_currencies=usd&precision=18') as resp)),
usdc_current as (SELECT
resp:data:"bridged-usd-coin-base":usd as usdbc_current_price
from (SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/simple/price?ids=bridged-usd-coin-base&vs_currencies=usd&precision=18') as resp)),
cbeth_current as (SELECT
resp:data:"coinbase-wrapped-staked-eth":usd as cbeth_current_price
from (SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/simple/price?ids=coinbase-wrapped-staked-eth&vs_currencies=usd&precision=18') as resp)),
WETH_prices as (
select
hour,
case
when symbol = 'WETH' then 'aBasWETH'
end as symbol,
price
from ethereum.price.ez_hourly_token_prices
where symbol in ('WETH')
and hour >= '2023-08-22'),
Run a query to Download Data