Top Sold Tokens on Arbitrum

Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: EVM(network: arbitrum, dataset: combined) archive full history combined archive + realtime in one resu

By Akshat · saved 24 December 2024 · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query uses the realtime dataset (the default), which holds only a
#   recent window - hours to days depending on the cube.
#
#   For older data add a dataset to the top-level element:
#
#     EVM(network: arbitrum, dataset: combined)
#
#     archive   full history
#     combined  archive + realtime in one result
#
#   Archive and combined need the historical data add-on:
#   https://bitquery.io/pricing
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query MyQuery {
  EVM(network: arbitrum) {
    DEXTradeByTokens(
      where: {Block: {Time: {since: "2024-12-24T08:20:00Z"}}}
      limit: {count: 100}
      orderBy: {descendingByField: "total_sold"}
    ) {
      Trade {
        Currency {
          Name
          Symbol
          SmartContract
        }
      }
      total_bought: sum(of:Trade_Side_AmountInUSD if:{Trade:{Side:{Type:{is:buy}}}})
            total_sold: sum(of:Trade_Side_AmountInUSD if:{Trade:{Side:{Type:{is:sell}}}})

    }
  }
}

Similar queries