scottincryptoBadger Dex Prices
Updated 2023-02-13
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 chainlink_badger as (
select
block_timestamp
, 'Chainlink' as feed
, event_inputs:current::int / 1e8 as price
from ethereum.core.fact_event_logs
where 1=1
and contract_address = '0x8093150ec164753994a1f65616e04ae92a9ef8c5'
and block_timestamp >= current_date - interval'30 days'
and event_name = 'AnswerUpdated'
order by block_timestamp desc
)
, chainlink_wbtc as (
select
block_timestamp
, time_slice(block_timestamp, 15, 'minute') as block_time
, 'Chainlink' as feed
, event_inputs:current::int / 1e8 as price
from ethereum.core.fact_event_logs
where 1=1
and contract_address = '0xae74faa92cb67a95ebcab07358bc222e33a34da7'
and block_timestamp >= current_date - interval'30 days'
and event_name = 'AnswerUpdated'
order by block_timestamp desc
)
, dex_prices as (
select
time_slice(block_timestamp, 15, 'minute') as block_time
, platform || ' ' || pool_name as feed
, case
when symbol_in = 'WBTC' then amount_in
else amount_out
end as wbtc_amount
Run a query to Download Data