buy_messages

Streams DEX trades on Ethereum as they happen, where sell currency smart contract is 0x15e6…ed12, DEX smart contract is 0xad9e…f02d and block time since 2023-11-12, 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_BQ · saved 20 January 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The subscription

subscription SubGetTxForPairAddressList($netzwerk: evm_network, $blockTimeSince: DateTime, $tokenContractAddressList: [String], $pairContractAddressList: [String], $excludeTokens: [String]) {
  EVM(network: $netzwerk, trigger_on: head, mempool: true) {
    buyside: DEXTrades(
      orderBy: {ascending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {in: $tokenContractAddressList}}}, Dex: {SmartContract: {in: $pairContractAddressList}, Pair: {SmartContract: {}}}, Buy: {Buyer: {notIn: $excludeTokens}}}, Block: {Time: {since: $blockTimeSince}}}
    ) {
      Transaction {
        From
        Hash
      }
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
            SmartContract
          }
        }
        Sell {
          Amount
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
      }
      Block {
        Time
        Number
      }
    }
  }
}

Variables

{
  "tokenContractAddressList": ["0x15e6e0d4ebeac120f9a97e71faa6a0235b85ed12"],
  "pairContractAddressList": ["0xad9ef19e289dcbc9ab27b83d2df53cdeff60f02d"],
  "netzwerk": "eth",
  "blockTimeSince" : "2023-11-12T05:42:47Z",
  "excludeTokenList": ["0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13", "0x6b75d8af000000e20b7a7ddf000ba900b4009a80"]
}

Similar queries