Subscription Token Trades

Streams the latest 10 DEX trades on Ethereum as they happen, where DEX protocol name is uniswap_v2: chain ID, block time, block number, transaction hash, smart contract, protocol family, protocol name and 13 more fields.

By Nadia · saved 17 February 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The subscription

subscription ($network: evm_network, $limit: Int!, $offset: Int!, $protocol: String) {
  EVM(network: $network) {
    DEXTrades(
      orderBy: {descending: Block_Number}
      limit: {offset: $offset, count: $limit}
      where: {Trade: {Dex: {ProtocolName: {is: $protocol}}, Buy: {Currency: {Fungible: false}}}}
    ) {
      ChainId
      Block {
        Time
        Number
      }
      Transaction {
        Hash
      }
      Trade {
        Dex {
          SmartContract
          ProtocolFamily
          ProtocolName
          ProtocolVersion
        }
        Buy {
          Currency {
            Symbol
            SmartContract
          }
          Amount
          AmountInUSD
          Buyer
          Seller
        }
        Sell {
          Seller
          Amount
          AmountInUSD
          Currency {
            Symbol
            SmartContract
            Name
          }
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10,
  "offset": 0,
  "from": "2024-01-04",
  "till": "2024-01-10",
  "protocol": "uniswap_v2"
}

Similar queries