rezarwzKey Metrics copy copy
    Updated 2025-04-15
    -- forked from Key Metrics copy @ https://flipsidecrypto.xyz/studio/queries/73e870bf-c9b7-4e58-9112-6fa55088dcb1
    with all_trades as (
    select
    'Arbitrum' as blockchain,
    tr1.tx_hash,
    lo.block_timestamp,
    tr1.symbol as in_token,
    tr2.symbol as out_token,
    tr1.AMOUNT_USD as amount_in,
    tr2.AMOUNT_USD as amount_out,
    lo.decoded_log:taker as taker,
    CASE
    when amount_in is not null then amount_in
    else amount_out
    end as volume_usd,
    CASE
    WHEN in_token < out_token THEN in_token || '-' || out_token
    ELSE out_token || '-' || in_token
    END AS Pairs_trade
    from
    Arbitrum.core.ez_decoded_event_logs lo
    left join Arbitrum.core.ez_token_transfers tr1 on lo.tx_hash = tr1.tx_hash
    left join Arbitrum.core.ez_token_transfers tr2 on tr1.tx_hash = tr2.tx_hash
    where
    lo.contract_address = '0x109d9cdfa4ac534354873ef634ef63c235f93f61'
    and lo.event_name = 'OrderComplete'
    and tr1.from_Address = tr1.origin_from_address
    and tr1.to_Address in (
    '0x50793d97a0c905ea51c1c93f37fc73abe6d2ffcc',
    '0x109d9cdfa4ac534354873ef634ef63c235f93f61'
    )
    and tr2.from_Address in(
    '0x50793d97a0c905ea51c1c93f37fc73abe6d2ffcc',
    '0x109d9cdfa4ac534354873ef634ef63c235f93f61'
    )
    and tr2.to_Address = tr2.origin_from_address
    Last run: 12 days agoAuto-refreshes every 24 hours
    LAST_24_VOL
    LAST_7_D_VOL
    LAST_30_D_VOL
    ALL_TIME_VOL
    AVG_DAILY_VOL
    AVG_VOL_TX
    AVG_VOL_PER_USER
    AVG_WEEKLY_VOL
    TX_LAST24_VOL
    TX_7_D
    TX_30_D
    ALL_TX
    AVG_DAILY_TX
    AVG_TX_PER_USER
    AVG_WEEKLY_TX
    MED_DAILY_TX
    MEDIAN_VOL_TX
    1
    0000
    1
    76B
    140s