leon and leos

Returns the latest 10 DEX trades on Ethereum and BNB Chain, where buy currency is 0xbb4c…095c or 0xe9e7…7d56, sell currency is 0x2c83…c2f1 or 0x27E8…0381 and date since 2022-02-01: timestamp time, block height, trade index, protocol, full name, address address, annotation and 6 more fields.

By gaurav · saved 15 March 2022 · 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: {since: "2022-02-01", till: "2022-02-10"}
      buyCurrency: {in: ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0xe9e7cea3dedca5984780bafc599bd69add087d56"]}
      sellCurrency: {in: ["0x2c8368f8f474ed9af49b87eac77061beb986c2f1", "0x27E873bee690C8E161813DE3566E9E18a64b0381"]}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      sellAmount: buyAmount
      sellCurrency: buyCurrency {
        address
        symbol
      }
      buyAmount: sellAmount
      buyCurrency: sellCurrency {
        address
        symbol
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "bsc"
}

Similar queries