rezarwzvolume and trades in past x days by Blockahin
    Updated 2025-04-14
    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
    AND lo.block_timestamp >= DATEADD(day, - {{past_x_days}}, CURRENT_DATE)
    Last run: 15 days agoAuto-refreshes every 24 hours
    DATE
    BLOCKCHAIN
    Volume(USD)
    # of Trades
    1
    2025-04-07 00:00:00.000Arbitrum44.6569511431
    1
    55B
    80s