KelHoggs-T6h_ROGains Network Perp Volume + Traders copy
Updated 2024-07-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
31
32
33
34
35
36
›
⌄
-- forked from 0xnirmal / Gains Network Perp Volume + Traders @ https://flipsidecrypto.xyz/0xnirmal/q/WBQ5msVGjjEz/gains-network-perp-volume-traders
with
arbitrum as (
select
block_timestamp::date as date,
DECODED_LOG:positionSizeDai::number / 1e18 positionSizeDai,
FULL_DECODED_LOG:data[1]:value[7]::number leverage,
positionSizeDai * leverage as volume,
FULL_DECODED_LOG:data[1]:value[0] trader,
*
from
arbitrum.core.ez_decoded_event_logs
where
lower(contract_address) = lower('0x298a695906e16aeA0a184A2815A76eAd1a0b7522')
and (Event_Name = 'MarketExecuted')
UNION
select
block_timestamp::date as date,
DECODED_LOG:positionSizeDai::number / 1e18 positionSizeDai,
FULL_DECODED_LOG:data[0]:value[7]::number leverage,
positionSizeDai * leverage as volume,
FULL_DECODED_LOG:data[0]:value[0] trader,
*
from
arbitrum.core.ez_decoded_event_logs
where
lower(contract_address) = lower('0x298a695906e16aeA0a184A2815A76eAd1a0b7522')
and (Event_Name = 'LimitExecuted')
),
polygon as (
select
block_timestamp::date as date,
DECODED_LOG:positionSizeDai::number / 1e18 positionSizeDai,
FULL_DECODED_LOG:data[1]:value[7]::number leverage,
positionSizeDai * leverage as volume,
QueryRunArchived: QueryRun has been archived