EVM ATH

Returns 10 DEX trades by token and balance updates on Ethereum, where currency smart contract is 0x12aA…6335, sorted by balance, highest first: currency symbol, smart contract, currency name, decimals, quantile of trade price in USD, count, sum of balance update amount and 2 more fields.

By LÂM QUANG VINH · saved 11 May 2025 · run 17 times · Bitquery API v2

What it returns

Filters

The query

query TradingView($token: String!, $network: evm_network) {
  EVM(dataset: realtime, network: $network) {
    DEXTradeByTokens(where: {Trade: {Currency: {SmartContract: {is: $token}}}}) {
      Trade {
        Currency {
          Symbol
          SmartContract
          Name
          Decimals
        }
      }
      max: quantile(of: Trade_PriceInUSD, level: 1)
      count
    }
    BalanceUpdates(
      where: {Currency: {SmartContract: {is: $token}}}
      orderBy: {descendingByField: "balance"}
      limit: {count: 10}
    ) {
      balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      BalanceUpdate {
        Address
      }
    }
    Transfers(
      where: {Transfer: {Currency: {SmartContract: {is: $token}}, Success: true}}
    ){
      minted: sum(
        of: Transfer_Amount
        if: {
          Transfer: {
            Sender: { is: "0x0000000000000000000000000000000000000000" }
          }
        }
      )
      burned: sum(
        of: Transfer_Amount
        if: {
          Transfer: {
            Receiver: { is: "0x0000000000000000000000000000000000000000" }
          }
        }
      )
    }
  }
}

Variables

{
  "network": "eth",
  "token": "0x12aAd52034fb19B3106E5771B548eBb80A536335"
}

Similar queries