hessPlatforms Overview
Updated 2023-08-26
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 price as ( select date(hour) as date, token_address, symbol , price
from base.core.fact_hourly_token_prices
UNION
select date(hour) as date, token_address, symbol , price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
and hour::date >= '2023-07-28'
)
,
price_plus as ( select date, symbol, avg(price) as avg_price
from price
group by 1,2
UNION
SELECT
TO_TIMESTAMP(value[0]::string) as date,
'Quack' as symbol
, value[1] as avg_price
from (
SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/quack-token/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
)
,LATERAL FLATTEN (input => resp:data:prices)
UNION
SELECT
TO_TIMESTAMP(value[0]::string) as date,
'DACKIE' as symbol
, value[1] as avg_price
from (
SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/dackieswap/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
)
,LATERAL FLATTEN (input => resp:data:prices)
UNION
SELECT
TO_TIMESTAMP(value[0]::string) as date,
'BSWAP' as symbol
Run a query to Download Data