Realtime Uniswap v1 Uniswap v2 Uniswap V3 Trades

All versions

Returns DEX trades on Base, where DEX protocol name is uniswap_v3, uniswap_v2 or 1 more: block number, block time, from, to, transaction hash, delegated, delegated to and 21 more fields.

By Akshat · saved 11 December 2025 · run 4 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query uses the realtime dataset (the default), which holds only a
#   recent window - hours to days depending on the cube.
#
#   For older data add a dataset to the top-level element:
#
#     EVM(network: base, dataset: combined)
#
#     archive   full history
#     combined  archive + realtime in one result
#
#   Archive and combined need the historical data add-on:
#   https://bitquery.io/pricing
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query {
  EVM(network: base) {
    DEXTrades(where: {Trade: {Dex: {ProtocolName: {in:["uniswap_v3","uniswap_v2","uniswap_v1"]}}}}) {
      Block {
        Number
        Time
      }
      Transaction {
        From
        To
        Hash
      }
      Trade {
        Dex {
          Delegated
          DelegatedTo
          OwnerAddress
          Pair {
            Decimals
            Name
            SmartContract
          }
          ProtocolFamily
          ProtocolName
          ProtocolVersion
          SmartContract
        }
        Buy {
          Amount
          Buyer
          Currency {
            Name
            Symbol
            SmartContract
          }
          Seller
          Price
        }
        Sell {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          Price
        }
      }
    }
  }
}

Similar queries