Ethereum dextrades

Returns DEX trades by token on Ethereum: trade amount, price in USD, seller, success and buyer.

By hk · saved 22 May 2025 · Bitquery API v2

What it returns

The query

query($account: String, $fromTime: DateTime, $offset: Int, $limit: Int) {
  EVM(dataset: combined, network: eth) {
    DEXTradeByTokens(
      where: {
        any: [
          {Trade: {Buyer: {is: $account}}},
          {Trade: {Seller: {is: $account}}}
        ],
        Block: {Time: {after: $fromTime}}
      }
      limit: {
        offset: $offset,
        count: $limit,
      }
    ) {
      Trade {
        Amount
        PriceInUSD
        Seller
        Success
        Buyer
      }
    }
  }
}

Variables

{
  "account": "0xD270014849d550d280135e2DC57B0cF8Ec63FF2f",
  "fromTime": "1970-01-01T00:00:00.000Z",
  "offset": 0,
  "limit": 10,
}

Similar queries