DEX trades for a SmartContract

Returns the latest 10 DEX trades on Ethereum and BNB Chain, where base currency is 0xe568…0371, date since 2022-06-15 and date till 2022-06-17: timestamp time, block height, trade index, protocol, full name, base amount, base currency address and 5 more fields.

By Sayon Sai Dutta · saved 17 June 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $token: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      baseCurrency: {is: $token}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "bsc",
  "token": "0xe56842ed550ff2794f010738554db45e60730371",
  "from": "2022-06-15",
  "till": "2022-06-17T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries