Token Amount - issue

Returns the latest DEX trades on Ethereum, where block time since 2025-04-20 and block time till 2025-05-05: transaction hash, from, protocol family, protocol name, smart contract, buy amount, buy amount in USD and 11 more fields.

By lukas · saved 22 May 2025 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query ($evm_chain: evm_network, $wallet_address: String!, $from: DateTime!, $to: DateTime!) {
  EVM(network: $evm_chain, dataset: combined) {
    DEXTrades(
      where: {TransactionStatus: {Success: true}, any: [{Trade: {Sell: {Currency: {Fungible: true}, Seller: {is: $wallet_address}}}}, {Trade: {Buy: {Currency: {Fungible: true}, Buyer: {is: $wallet_address}}}}, {Transaction: {From: {is: $wallet_address}}}], Block: {Time: {since: $from, till: $to}}}
      orderBy: {descending: Block_Time}
    ) {
      Transaction {
        Hash
        From
      }
      Trade {
        Dex {
          ProtocolFamily
          ProtocolName
          SmartContract
        }
        Buy {
          Amount
          AmountInUSD
          Buyer
          PriceInUSD
          Currency {
            Name
            SmartContract
          }
          Seller
        }
        Sell {
          AmountInUSD
          Amount
          PriceInUSD
          Currency {
            Name
            SmartContract
          }
        }
      }
      Block {
        Time
      }
    }
  }
}

Variables

{
  "evm_chain": "eth",
  "wallet_address": "0x74d67c64e438b954ed48d657dd830d04ea7c4fc4",
  "from": "2025-04-20T00:14:59Z",
  "to": "2025-05-05T00:14:59Z"
}

Similar queries