scottincryptoStader Quickswap Matic/MaticX LP Token Price by Day
Updated 2022-09-26
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
›
⌄
-- Quickswap Matic/MaticX 0xb0e69f24982791dd49e316313fd3a791020b8bf7
with mints as (
select
date_trunc('day', block_timestamp) as block_day
, 'Quickswap Matic/MaticX' as lp
, contract_address
, tx_hash
-- , event_name
-- , event_inputs
, sum(event_inputs:amount0::int) / 1e18 as matic_amount
, sum(event_inputs:amount1::int) / 1e18 as maticx_amount
-- , event_inputs:sender::text as sender
from polygon.core.fact_event_logs
where 1=1
and contract_address = '0xb0e69f24982791dd49e316313fd3a791020b8bf7'
-- and tx_hash = '0x7dbd1eeff7f53c9be4a59ef3a67808b5410b1cbef8582b6f6f26839add33ff88'
and event_name = 'Mint'
group by 1,2,3,4
)
, mints_transfers as (
select
block_timestamp
, tx_hash
, date_trunc('day', block_timestamp) as block_day
, sum(raw_amount) / 1e18 as lp_amount
from polygon.core.fact_token_transfers
where 1=1
and contract_address = '0xb0e69f24982791dd49e316313fd3a791020b8bf7'
-- and tx_hash = '0x7dbd1eeff7f53c9be4a59ef3a67808b5410b1cbef8582b6f6f26839add33ff88'
-- and to_address != '0x0e43245f7af3cfb1d4838e6704f27d09a8b4b072' --quickswap mint fee receiver
and from_address = '0x0000000000000000000000000000000000000000' --mint transfers only
group by 1,2,3
)
Run a query to Download Data