Top trades for a specific currency for specific time

Returns 5 DEX trades on Ethereum, where buy currency smart contract is 0x586a…7bab, buy buyer is not 0xae2F…aE13 or 0xaEC2…cb03 and sell currency smart contract is 0xc02a…6cc2, sorted by trade sell amount, highest first: buy buyer, buy currency symbol, buy amount, sell amount, sell currency symbol, block time, transaction hash and 2 more fields.

By Omkar_BQ · saved 13 September 2023 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    DEXTrades(
      limit: {count: 5}
      orderBy: {descending: Trade_Sell_Amount}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x586a7cFE21E55ec0E24f0bfB118F77fE4cA87bab"}}, Buyer: {notIn: ["0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13", "0xaEC2605a04bB7709a61eF43d660712Ece030cb03"]}}, Sell: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Amount: {gt: "0.05"}}}, Block: {Time: {since: "2023-08-10T12:44:11Z", till: "2023-08-10T16:44:11Z"}}}
    ) {
      Trade {
        Buy {
          Buyer
          Currency {
            Symbol
          }
          Amount
        }
        Sell {
          Amount
          Currency {
            Symbol
          }
        }
      }
      Block {
        Time
      }
      Transaction {
        Hash
        Value
        Cost
      }
    }
  }
}

Similar queries