first 3 trades of a given token

Returns 3 DEX trades on Ethereum and BNB Chain, where base currency is 0x4a2c…3c98, date since 2022-06-13 and date till 2022-06-20, sorted by block height trade index: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 20 June 2022 · run 3 times · 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: {asc: ["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 {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 3,
  "offset": 0,
  "network": "bsc",
  "token": "0x4a2c860cec6471b9f5f5a336eb4f38bb21683c98",
  "from": "2022-06-13",
  "till": "2022-06-20T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries