P20 | P40 | P60 | P80 | |
---|---|---|---|---|
1 | 0.01628556 | 0.01763239 | 0.0228647488 | 0.051105 |
tkvresearchmarked-turquoise
Updated 2025-04-27
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 buy_tab as
(select block_timestamp,
tx_hash,
origin_from_address as swapper,
'buy' as action_,
(case when amount_in_usd is null then amount_out_usd end )/amount_out as price_buy,
amount_out as amount_buy,
case when amount_in_usd is null then amount_out_usd end as total_vol_usd
from base.defi.ez_dex_swaps
where token_out = lower('{{token_address}}')
and block_timestamp >= DATEADD(day, -30, CURRENT_TIMESTAMP())),
sell_tab as
(select block_timestamp,
tx_hash,
origin_from_address as swapper,
'sell' as action_,
(case when amount_out_usd is null then amount_in_usd end)/amount_in as price_sell,
-amount_in as amount_sell,
-(case when amount_out_usd is null then amount_in_usd end) as total_vol_usd
from base.defi.ez_dex_swaps
where token_in = lower('{{token_address}}')
and block_timestamp >= DATEADD(day, -30, CURRENT_TIMESTAMP())),
price_tab as (
select hour,
token_address,
price
from base.price.ez_prices_hourly
where token_address = lower('{{token_address}}')
),
master_tab as
(select date_hour,
tx_hash,
swapper,
Last run: about 1 month ago
1
47B
2s