mmdrezavolume scope
    Updated 1 hour ago
    with price as (
    select hour::date as edate,
    avg(price) as usd_price
    from solana.price.ez_prices_hourly
    where token_address = '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'
    group by 1
    )
    SELECT
    count(DISTINCT tx_id) as total_bought,
    (sum(abs(pre_balances[0] - post_balances[0])) / power(10,9)) as volume,
    (sum(abs(pre_balances[0] - post_balances[0])) / power(10,9) * avg(usd_price)) as volume_usd
    from eclipse.core.fact_transactions
    join price on block_timestamp::date = edate
    WHERE
    ((log_messages[0] LIKE 'Program Rarim7DMoD45z1o25QWPsWvTdFSSEdxaxriwWZLLTic invoke [1]'
    and log_messages[1] LIKE 'Program log: Instruction: FillOrder')
    OR (log_messages[2] LIKE 'Program Rarim7DMoD45z1o25QWPsWvTdFSSEdxaxriwWZLLTic invoke [1]'
    and log_messages[3] LIKE 'Program log: Instruction: FillOrder'))
    and block_timestamp > '2024-12-05 14:00:00.000'
    and signers[0] = '{{Address}}'
    AND SUCCEEDED


    Last run: about 1 hour ago
    TOTAL_BOUGHT
    VOLUME
    VOLUME_USD
    1
    0
    1
    15B
    1s