elenahooLUNA daily price & LUNA/bLUNA premium
Updated 2022-01-01
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
›
⌄
with bluna_price as (
select date_trunc('day',block_timestamp) as date
, source as bluna_source
, avg(price_usd) as bluna_usd
from terra.oracle_prices
where lower(SYMBOL) in ('bluna')
and date_trunc('day',block_timestamp) > '2021-10-31 00:00:00.000'
group by 1,2
),
luna_price as (
select date_trunc('day',block_timestamp) as date
, source as luna_source
, avg(price_usd) as luna_usd
from terra.oracle_prices
where lower(SYMBOL) in ('luna')
and date_trunc('day',block_timestamp) > '2021-10-31 00:00:00.000'
group by 1,2
)
select a.date
, luna_source
, luna_usd
, bluna_source
, bluna_usd
, (luna_usd - bluna_usd) as luna_bluna_premium
, (luna_usd - bluna_usd)/luna_usd as premium_pct
from bluna_price as a
join luna_price as b
on a.date = b.date
order by date asc
Run a query to Download Data