scottincryptostMATIC Dex Prices
Updated 2023-04-26
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 times as (
select
date_hour as block_time
from crosschain.core.dim_date_hours
where date_hour >= current_date - interval'30 days'
union all
select
dateadd('minute', 15, date_hour) as block_time
from crosschain.core.dim_date_hours
where date_hour >= current_date - interval'30 days'
union all
select
dateadd('minute', 30, date_hour) as block_time
from crosschain.core.dim_date_hours
where date_hour >= current_date - interval'30 days'
union all
select
dateadd('minute', 45, date_hour) as block_time
from crosschain.core.dim_date_hours
where date_hour >= current_date - interval'30 days'
)
, bal_v2_pool as (
select
block_number
, time_slice(block_timestamp, 15, 'minute') as block_time
, 'Bal V2 WMATIC/stMATIC' as feed
, 2 as sort_order
, event_inputs:amountIn/1e18 as wmatic_amount
, event_inputs:amountOut/1e18 as stmatic_amount
, div0(wmatic_amount, stmatic_amount) as wmatic_stmatic_price
from polygon.core.fact_event_logs
where contract_address = '0xba12222222228d8ba445958a75a0704d566bf2c8' -- Balancer V2 Vault
and block_timestamp >= current_date - interval'30 days'
and event_name = 'Swap'
and topics[1] = '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d' -- WMATIC/stMATIC Comp Stable Pool
Run a query to Download Data