Trades By Pairs

Returns 10 DEX trades on Ethereum, where block date since 2023-07-06 and block date till 2023-07-12, sorted by count, highest first: block date, chain ID, unique of block date, count, sum of trade buy amount, sum of trade buy amount in USD, buy currency symbol and 3 more fields.

By Nadia · saved 13 February 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $limit: Int!, $offset: Int!, $from: String, $till: String) {
  EVM(dataset: combined, network: $network) {
    DEXTrades(
      limit: {count: $limit, offset: $offset}
      where: {Block: {Date: {since: $from, till: $till}}, Trade: {Success: true}}
      orderBy: {descendingByField: "count"}
    ) {
      Block {
        Date(minimum: Block_Date)
      }
      ChainId
      uniq(of: Block_Date)
      count
      Buy_Amount: sum(of: Trade_Buy_Amount)
      Buy_Amount_usd: sum(of: Trade_Buy_AmountInUSD)
      Trade {
        Buy {
          Currency {
            Symbol
            SmartContract
          }
        }
        Sell {
          Currency {
            Symbol
            SmartContract
          }
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10,
  "offset": 0,
  "from": "2023-07-06",
  "till": "2023-07-12"
}

Similar queries