dex

Returns 100 DEX trades by token on Base, where block time since 2025-02-06, sorted by buy, highest first: currency symbol, currency name, smart contract, decimals, amount in USD, sum of trade side amount in USD, chain ID and 5 more fields.

By Dandex · saved 9 February 2025 · Bitquery API v2

What it returns

Filters

The query

query timeDiagram($network: evm_network, $time_ago: DateTime) {
  EVM(
    network: $network
    mempool: false
    aggregates: yes
    dataset: realtime
    select_blocks: trunk
  ) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "buy", ascendingByField: ""}
      limit: {count: 100, offset: 10}
      where: {Block: {Time: {since: $time_ago}}}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          SmartContract(maximum: Fee_BurntInUSD, minimum: Fee_BurntInUSD)
          Decimals
        }
        AmountInUSD(maximum: Fee_BurntInUSD, minimum: Fee_BurntInUSD)
      }
      buy: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}, Success: false}}
      )
      sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
      ChainId(maximum: Fee_BurntInUSD, minimum: Fee_BurntInUSD)
      average(of: Fee_BurntInUSD)
      array_intersect(side1: Block_L1_Number, side2: Block_L1_Number)
      dispersion(of: Fee_BurntInUSD)
      theil_index(of: Fee_BurntInUSD)
      theils_corrected
    }
  }
}

Variables

{
  "network": "base",
  "time_ago": "2025-02-06T09:44:34Z"
}

Similar queries