John_GaltHourly yLuna Price in UST
Updated 2022-07-07
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 table1 as (select -- simple buying yluna
TO_CHAR(block_timestamp, 'YYYY-MM-DD"T"HH24') as date,
event_attributes:offer_amount / pow(10, 6) as prism_spent,
event_attributes:return_amount / pow(10,6) as yluna_received
from terra.msg_events
where date > '2022-02-10'
and event_attributes:"0_to" = 'terra1kqc65n5060rtvcgcktsxycdt2a4r67q2zlvhce'
and event_attributes:"1_action" = 'swap'
and event_index = 3
and event_attributes:"offer_asset" = 'cw20:terra1dh9478k2qvqhqeajhn75a2a7dsnf74y5ukregw' --prism
and event_attributes:"ask_asset" = 'cw20:terra17wkadg0tah554r35x6wvff0y5s7ve8npcjfuhz' --yluna
union all
select
TO_CHAR(block_timestamp, 'YYYY-MM-DD"T"HH24') as date, --routed transactions buying yluna
event_attributes:"1_offer_amount" / pow(10, 6) as prism_spent,
event_attributes:"1_return_amount" / pow(10,6) as yluna_received
from terra.msg_events
where date > '2022-02-10'
and event_attributes:"2_to" = 'terra1kqc65n5060rtvcgcktsxycdt2a4r67q2zlvhce'
and event_index = 3
and event_attributes:"4_action" = 'swap'
and event_attributes:"1_offer_asset" = 'cw20:terra1dh9478k2qvqhqeajhn75a2a7dsnf74y5ukregw' --prism
and event_attributes:"1_ask_asset" = 'cw20:terra17wkadg0tah554r35x6wvff0y5s7ve8npcjfuhz' --yluna
union all
select
TO_CHAR(block_timestamp, 'YYYY-MM-DD"T"HH24') as date, -- routed transaction buying yluna
event_attributes:"1_offer_amount" / pow(10, 6) as prism_spent,
event_attributes:"1_return_amount" / pow(10,6) as yluna_received
from terra.msg_events
where block_timestamp > '2022-02-10'
and event_attributes:"4_to" = 'terra1kqc65n5060rtvcgcktsxycdt2a4r67q2zlvhce'
Run a query to Download Data