CJ API

Returns the latest DEX trade on Ethereum and BNB Chain, where date till 2021-08-29 and height is above 10401338: timestamp time, block height, trade index, protocol, buy amount, buy currency symbol, buy currency address and 6 more fields.

By gaurav · saved 29 August 2021 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      height: {gt: 10401338}
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      buyAmount
      buyCurrency {
        symbol
        address
      }
      sellAmount
      sellCurrency {
        symbol
        address
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
      smartContract {
        address {
          address
        }
      }
    }
  }
}

Variables

{
  "limit": 1,
  "offset": 0,
  "network": "bsc",
  "since": "2021-08-29T13:05:00",
  "till": "2021-08-29T13:05:59"
}

Similar queries