QUERY ERROR

Returns 5000 DEX trades on Ethereum, where sell currency smart contract is 0xd057…4Ba9, block time since 2025-06-10 and block time till 2025-06-10, sorted by block time: block time, buy amount, buy amount in USD, buy currency symbol, buy smart contract, buy decimals, buy currency name and 10 more fields.

By Alpha Spotter · saved 18 June 2025 · run 27 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($address: String!, $since: DateTime!, $till: DateTime!) {
  EVM(dataset: combined, network: eth) {
    DEXTradesSell: DEXTrades(
      where: {
        Trade: {
          Sell: {
            Currency: {
              SmartContract: {is: $address}
            }
          }
        },
        TransactionStatus: {
          Success: true
        },
        Block: {
          Time: {since: $since, till: $till}
        }
      }
      orderBy: {ascending: Block_Time}
      limit: {count: 5000}
    ) {
      Block {
        Time
      }
      Trade {
        Buy {
          Amount
          AmountInUSD
          Currency {
            Symbol
            SmartContract
            Decimals
            Name
          }
        }
        Sell {
          Amount
          AmountInUSD
          Currency {
            Symbol
            SmartContract
            Decimals
            Name
          }
        }
      }
      Transaction {
        Hash
        Value
        ValueInUSD
      }
      Fee {
        SenderFee
      }
    }
  }
}

Variables

{
  "address": "0xd057312D3bFD2862150BF9b9469A8dDaa2c14Ba9",
  "since": "2025-06-10T08:35:35Z",
  "till": "2025-06-10T08:55:47Z"
}

Similar queries