history2

Returns the latest 200000 DEX trades on Ethereum and BNB Chain, where base currency is 0x07af…165b, date since 2021-04-21 and date till 2021-04-23: timestamp time, block height, trade index, protocol, full name, address address, annotation and 8 more fields.

By ethdev · saved 24 October 2021 · 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
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
      buyCurrency {
        symbol
      }
    }
  }
}

Variables

{"limit":200000,"offset":0,"network":"bsc","token":"0x07af67b392b7a202fad8e0fbc64c34f33102165b","from":"2021-04-21","till":"2021-04-23","dateFormat":"%Y-%m-%d"}

Similar queries