All_trades_of_a_token

Returns one DEX trade on Ethereum and BNB Chain, where buy currency is 0xbb4C…095c, sell currency is 0xbb4C…095c and date since 2023-05-02: buy currency symbol, buy currency address, sell currency symbol, sell currency address, transaction hash and date date.

By Omkar Acharekar · saved 3 May 2023 · run 4 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork, $from: ISO8601DateTime, $to: ISO8601DateTime, $dateFormat: String) {
  ethereum(network: $network) {
    buycurrency: dexTrades(
      options: {limit: 1}
      tradeAmountUsd: {gt: 0}
      buyCurrency : {is : "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      date: {since: $from, till: $to}
    ) {
      buyCurrency {
        symbol
        address
      }
     sellCurrency{
       symbol
       address
     }
      transaction {
        hash
      }
      date {
        date(format: $dateFormat)
      }
    }
    sellcurrency : dexTrades(
      options: {limit: 1}
      tradeAmountUsd: {gt: 0}
      sellCurrency : {is : "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      date: {since: $from, till: $to}
    ) {
      buyCurrency {
        symbol
        address
      }
     sellCurrency{
       symbol
       address
     }
      transaction {
        hash
      }
      date {
        date(format: $dateFormat)
      }
    }
  }
}

Variables

{
  "network": "bsc",
  "from": "2023-05-02T00:00:00Z",
  "to": "2023-05-02T23:59:59Z",
  "dateFormat": "%Y-%m-%d"
}

Similar queries