EC trades

Returns the latest 100 DEX trades on Ethereum and BNB Chain, where base currency is 0x400d…f7ec, sell currency is 0xbb4c…095c and exchange name is Pancake or Pancake v2: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 18 November 2021 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!,  $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {is: "2021-11-16"}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0x400df62c3052fdbaad8c74c0226147f9bfaaf7ec"}
      sellCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
    ) {
      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": 100,
  "offset": 0,
  "network": "bsc",
  "dateFormat": "%Y-%m-%d"
}

Similar queries