Trade History BSC

Returns the latest 5 DEX trades on Ethereum and BNB Chain, where smart contract address is 0x6495…aab3, date since 2022-04-13 and date till 2022-04-20: timestamp time, block height, full name, buy amount, buy currency address, buy currency symbol, sell amount and 5 more fields.

By Sayon Sai Dutta · saved 20 April 2022 · run 8 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $address: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "block.height", limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      smartContractAddress: {is: $address}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      exchange {
        fullName
      }
      buyAmountInBNB: buyAmount
      buyAmountInUSD: buyAmount(in: USD)
      buyCurrency {
        address
        symbol
      }
      sellAmountInBNB: sellAmount
      sellAmountInUSD: sellAmount(in: USD)
      sellCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
      maker{
        address
        annotation
      }
    }
  }
}

Variables

{
  "limit": 5,
  "offset": 0,
  "network": "bsc",
  "address": "0x6495c4885382e32217957dbce6bb1c7e04a9aab3",
  "from": "2022-04-13",
  "till": "2022-04-20T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries