rezarwzbasic volume and trade transaction
    Updated 2025-04-15
    with all_trades as (
    select
    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
    Blast.core.ez_decoded_event_logs lo
    left join Blast.core.ez_token_transfers tr1 on lo.tx_hash = tr1.tx_hash
    left join Blast.core.ez_token_transfers tr2 on tr1.tx_hash = tr2.tx_hash
    where
    lo.contract_address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and lo.event_name = 'OrderComplete'
    and tr1.from_Address = tr1.origin_from_address
    and tr1.to_Address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and tr2.from_Address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and tr2.to_Address = tr2.origin_from_address
    )
    SELECT
    date_trunc('{{Time_frame}}', block_timestamp) as date,
    Pairs_trade,
    sum(volume_usd) as "Volume(USD)",
    sum(sum(volume_usd)) over(
    partition by Pairs_trade
    order by
    Last run: 10 days agoAuto-refreshes every 24 hours
    DATE
    PAIRS_TRADE
    Volume(USD)
    Total Volume(USD)
    # of Trades
    # of Total Trades
    1
    2024-04-10 00:00:00.000USDB-WETH8771431.5923900585714795.4847065379947516
    2
    2024-04-11 00:00:00.000USDB-WETH26014925.8303206111729721.3150271227959795
    3
    2024-04-07 00:00:00.000WETH-mwstETH-WPUNKS:401209.47544822361901.7340055224163
    4
    2024-07-25 00:00:00.000USDB-WETH13087.925691394497850356.62338821248082
    5
    2024-05-14 00:00:00.000USDB-WETH3542816.5338589273092156.2924171416145937
    6
    2024-05-15 00:00:00.000USDB-WETH2793692.46541744275885848.7578341394147331
    7
    2024-05-25 00:00:00.000USDB-WETH10204098.561781317979156.3827543346166925
    8
    2024-07-22 00:00:00.000USDB-WETH519891.265871576496854254.772095440247732
    9
    2024-02-29 00:00:00.000USDB-WETH49481.75926672449481.7592667244242
    10
    2024-04-19 00:00:00.000USDB-WETH4386610.18874881173599156.782803347188499
    11
    2024-05-24 00:00:00.000USDB-WETH6018569.8113414307775057.8209732414163579
    12
    2024-06-15 00:00:00.000WETH-mwstETH-WPUNKS:20559.3356288391441829.084230924357
    13
    2024-05-31 00:00:00.000WETH-mwstETH-WPUNKS:208622.421246694.760642672326
    14
    2024-11-11 00:00:00.000BLAST-USDB40.290907085535.49122049419
    15
    2024-03-24 00:00:00.000WETH-mwstETH-WPUNKS:40942.501346039125176.046540817429
    16
    2024-07-07 00:00:00.000USDB-WETH491079.905723552488538421.551424263241749
    17
    2024-07-18 00:00:00.000USDB-WETH615206.899000918493165841.474763526244374
    18
    2024-04-28 00:00:00.000USDB-WETH3989364.04570046207269453.0597422769109394
    19
    2024-05-17 00:00:00.000USDB-WETH1776653.39189019278693071.2114451257149554
    20
    2024-04-29 00:00:00.000USDB-WETH4313408.61133825211582861.671082924112318
    ...
    318
    26KB
    1s