buyguard_buy_messages_query

Streams DEX trades on BNB Chain as they happen, where sell currency smart contract is 0xf116…0639, DEX smart contract is 0x6964…05cb 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 1 March 2024 · 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) {
    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": ["0xf116ad255b5260a4894611ed049731ffc1e60639"],
  "pairContractAddressList": ["0x6964bd492525540e7660fbb9615a715b851f05cb"],
  "netzwerk": "bsc",
  "blockTimeSince" : "2023-11-12T05:42:47Z",
  "excludeTokenList": ["0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13", "0x6b75d8af000000e20b7a7ddf000ba900b4009a80"]
}

Similar queries