boomer77[Hard] Liquidity Pools on TerraSwap
Updated 2021-07-05
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
28
29
30
31
32
33
34
35
36
›
⌄
with top_volume as (
select date_trunc('day', block_timestamp) as metric_date,
msg_value:offer_coin:amount/1e6 as amount,
msg_value:offer_coin:denom::string as token_swap_in,
msg_value:ask_denom::string as token_swap_out
from terra.msgs
where msg_module = 'market'
),
token_pair as (
select amount,
token_swap_in, token_swap_out, CONCAT(token_swap_in,'-',token_swap_out)as token_pair,
CASE
when token_pair = 'uusd-usdr' then 'usdr-uusd'
when token_pair = 'uusd-uluna' then 'uluna-uusd'
when token_pair = 'uusd-ukrw' then 'ukrw-uusd'
when token_pair = 'uthb-uusd' then 'uusd-uthb'
when token_pair = 'uthb-uluna' then 'uluna-uthb'
when token_pair = 'usgd-uusd' then 'uusd-usgd'
when token_pair = 'usek-uusd' then 'uusd-usek'
when token_pair = 'ukrw-uaud' then 'uaud-ukrw'
when token_pair = 'usdr-uluna' then 'uluna-usdr'
when token_pair = 'umnt-uusd' then 'uusd-umnt'
when token_pair = 'umnt-uluna' then 'uluna-umnt'
when token_pair = 'uluna-uusd' then 'uusd-uluna'
when token_pair = 'ujpy-uusd' then 'uusd-ujpy'
when token_pair = 'ugbp-uusd' then 'uusd-ugbp'
when token_pair = 'uluna-ukrw' then 'ukrw-uluna'
when token_pair = 'uhkd-uusd' then 'uusd-uhkd'
when token_pair = 'umnt-usdr' then 'usdr-umnt'
else token_pair
end as tokens_pairs,
metric_date
from top_volume
)
Run a query to Download Data