EVM ATH

Returns 10 DEX trades by token and balance updates on Ethereum, where currency smart contract is 0xFc7E…Db98, sorted by balance, highest first: currency symbol, smart contract, currency name, decimals, pair name, quantile of trade price in USD, count and 3 more fields.

By LÂM QUANG VINH · saved 11 May 2025 · run 15 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}}}}
      limit: {count: 1}
    ) {
      Trade {
        Currency {
          Symbol
          SmartContract
          Name
          Decimals
        }
        Dex {
          Pair {
            SmartContract
            Name
          }
        }
      }
      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": "0xFc7EA2EB0E0bA0D1d1951CE0A12999F761CFDb98"
}

Similar queries