sv_

Returns the latest DEX trade on Ethereum, where sell currency smart contract is 0x863a…6fd7, DEX smart contract is 0x4051…2f12 and buy buyer is not 0xae2F…aE13 or 0xaEC2…cb03: from, transaction hash, buy amount, buy currency symbol, sell amount, sell currency name and sell currency symbol.

By Omkar_BQ · saved 14 December 2023 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query SubGetTxForPairAddressV2($netzwerk: evm_network, $tokenContractAddress: String, $pairContractAddress: String, $excludeTokens: [String]) {
  EVM(network: $netzwerk, dataset:combined) {
    buyside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {is: $tokenContractAddress}}}, Dex: {SmartContract: {is: $pairContractAddress}, Pair: {SmartContract: {}}}, Buy: {Buyer: {notIn: $excludeTokens}}}}
      limit: {count: 1}
    ) {
      Transaction {
        From
        Hash
      }
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
          }
        }
        Sell {
          Amount
          Currency {
            Name
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "tokenContractAddress": "0x863aa4a95e9967c87f09b84392780bc8dd376fd7",
  "pairContractAddress": "0x405115f4bf256f7bf60ddfaf343a9330a2e22f12",
  "netzwerk": "eth",
  "excludeTokens": ["0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13", "0xaEC2605a04bB7709a61eF43d660712Ece030cb03"]
}

Similar queries