BlockNumber_filter

Returns the latest 5 DEX trades on Ethereum, where buy currency smart contract is 0x2ef8…893b, sell currency symbol is WETH, USDC or 1 more and sell amount is above 0.01: buy currency symbol, buy amount, sell amount, sell currency symbol, block time, block number, transaction hash and from.

By Omkar_BQ · saved 15 December 2023 · run 32 times · Bitquery API v2

What it returns

Filters

The query

query MyBuyerCompV3($limitCount: Int = 5, $excludeTokens: [String], $tokenContractAddress: String, $buyerAddress: String, $symbols: [String!]!, $amountSell: String, $netzwerk: evm_network, $blockNumberSince: String, $blockNumberTill: String) {
  EVM(dataset: combined, network: $netzwerk) {
    DEXTrades(
      limit: {count: $limitCount}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: $tokenContractAddress}}, Buyer: {is: $buyerAddress}}, Sell: {Amount: {gt: $amountSell}, Currency: {Symbol: {in: $symbols}}, Buyer: {notIn: $excludeTokens}}}, Block: {Number: {gt: $blockNumberSince, lt: $blockNumberTill}}}
      orderBy: {descending: Block_Number, descendingByField: "Trade_Sell_Amount"}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
          }
          Amount
        }
        Sell {
          Amount
          Currency {
            Symbol
          }
        }
      }
      Block {
        Time
        Number
      }
      Transaction {
        Hash
        From
      }
    }
  }
}

Variables

{
  "limitCount": 5,
  "netzwerk": "eth",
  "tokenContractAddress": "0x2ef8a2ccb058915e00e16aa13cc6e36f19d8893b",
  "symbols": ["WETH", "USDC", "USDT"],
  "amountSell": "0.01",
  "blockNumberSince": "18792166",
  "blockNumberTill": "18792255",
  "$excludeTokens": [
    "0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13",
    "0xaEC2605a04bB7709a61eF43d660712Ece030cb03"
  ]
}

Similar queries