top traders for a token on Arbitrum

Returns 100 DEX trades by token on Arbitrum, where currency smart contract is 0x912c…6548 and block time since 2024-11-17, sorted by volume USD, highest first: buyer, seller, protocol family, sum of trade amount and sum of trade side amount in USD.

By Akshat · saved 16 December 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query topTraders($network: evm_network, $time_ago: DateTime, $token: String) {
  EVM(network: $network) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "volumeUsd"}
      limit: {count: 100}
      where: {Trade: {Currency: {SmartContract: {is: $token}}}, Block: {Time: {since: $time_ago}}}
    ) {
      Trade {
        Buyer
        Seller
        Dex {
          ProtocolFamily
        }
      }
      bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      volume: sum(of: Trade_Amount)
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "network": "arbitrum",
  "token": "0x912ce59144191c1204e64559fe8253a0e49e6548",
  "time_ago": "2024-11-17T08:11:44Z"
}

Similar queries