token_buy__

Streams DEX trades on Ethereum as they happen, where sell currency smart contract is 0x15e6…ed12 and DEX smart contract is 0xad9e…f02d, sorted by block time: from, transaction hash, buy amount, buy currency symbol, buy smart contract, sell amount, sell currency name and 4 more fields.

By Omkar Acharekar · saved 23 January 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The subscription

subscription buy_messages($network: evm_network, $tokenContractAddressList: [String], $pairContractAddressList: [String]) {
  EVM(network: $network, trigger_on: head) {
    buyside: DEXTrades(
      orderBy: {ascending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {in: $tokenContractAddressList}}}, Dex: {SmartContract: {in: $pairContractAddressList}}}}
    ) {
      Transaction {
        From
        Hash
      }
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
            SmartContract
          }
        }
        Sell {
          Amount
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
      }
      Block {
        Time
        Number
      }
    }
  }
}

Variables

{
  "tokenContractAddressList": [
    "0x15e6e0d4ebeac120f9a97e71faa6a0235b85ed12"
  ],
  "pairContractAddressList": [
    "0xad9ef19e289dcbc9ab27b83d2df53cdeff60f02d"
  ],
  "network": "eth"
}

Similar queries