dex trades

Returns the latest 1000 DEX trades on Ethereum and BNB Chain, where base currency is 0x268d…d96d and tx sender is 0xe3c3…e162: timestamp time, block height, trade index, protocol, base amount, base currency address, base currency symbol and 7 more fields.

By gaurav · saved 3 January 2022 · Bitquery API v1

What it returns

Filters

The query

query ($token: String!, $txSender: String!, $limit: Int!) {
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit}
      baseCurrency: {is: $token}
      txSender: {is: $txSender}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%dT%H:%M:%SZ")
        }
        height
      }
      tradeIndex
      protocol
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      sellAmount(in: USD)
      buyAmount(in: USD)
      transaction {
        hash
      }
      side
    }
  }
}

Variables

{
  "limit": 1000,
  "token": "0x268da903565367ed693b050dbe284e41f5b7d96d",
  "txSender": "0xe3c37012e28833ac9b95a21498ba13e313dfe162"
}

Similar queries