Latest DEX Trades of Token

BaseAddress - Token Address QuoteAddress - respective token address of pair here it is WBNB

By Chirag · saved 11 March 2022 · run 6 times · Bitquery API v1

What it returns

Filters

The query

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

Variables

{
  "limit": 1000,
  "offset": 0,
  "network": "bsc",
  "baseAddress": "0x7269d98af4aa705e0b1a5d8512fadb4d45817d5a",
  "quoteAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "from": "2021-11-16",
  "till": null,
  "dateFormat": "%Y-%m-%d"
}

Similar queries