clickhouse_streaming

Returns 200 DEX trades on Ethereum, where sell currency smart contract is 0xc02a…6cc2, 0x6b17…1d0f or 11 more, buy currency smart contract is 0xc02a…6cc2, 0x6b17…1d0f or 11 more and block time since 2023-12-04, sorted by count, highest first: buy currency symbol, buy currency name, buy smart contract, sell currency symbol, sell currency name, sell smart contract, smart contract and 3 more fields.

By Oluwatomisin · saved 4 December 2023 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query HotPairsQuery ($currencyList: [String!], $limit: Int!) {
  EVM(dataset: combined, network: eth) {
    buyside: DEXTrades(
      where: {Trade: {Sell: {Currency: {SmartContract: {in: $currencyList}}}}, Block: {Time: {since: "2023-12-04T09:45:00.000Z"}}}
      limit: {count: $limit}
      orderBy: {descendingByField: "count"}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Sell {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Dex {
          SmartContract
          Pair {
            SmartContract
          }
        }
      }
      count
      sum(of: Trade_Buy_Amount)
    }
    sellside: DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {in: $currencyList}}}}, Block: {Time: {since: "2023-12-04T09:45:00.000Z"}}}
      limit: {count: $limit}
      orderBy: {descendingByField: "count"}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Sell {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Dex {
          SmartContract
          Pair {
            SmartContract
          }
        }
      }
      count
      sum(of: Trade_Sell_Amount)
    }
  }
}

Variables

{
  "limit": 200,
  "currencyList": [
    "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "0x6b175474e89094c44da98b954eedeac495271d0f",
    "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "0x8e870d67f660d95d5be530380d0ec0bd388289e1",
    "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
    "0x4fabb145d64652a948d72533023f6e7a623c7c53",
    "0x57ab1ec28d129707052df4df418d58a2d46d5f51",
    "0x674c6ad92fd080e4004b2312b45f796a192d27a0",
    "0x83f798e925bcd4017eb265844fddabb448f1707d",
    "0x1456688345527be1f37e9e627da0837d6f08c925",
    "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
    "0xeb4c2781e4eba804ce9a9803c67d0893436bb27d"
  ]
}

Similar queries