ATH of base token

Historical data This query already reads history - it uses the combined dataset, which needs the historical data add-on for this chain. Without the add-on it fails with 'access restricted: your plan only allows realtime'. Drop the dataset argument to fall back to the recent window. Datasets: https:

By Akshat · saved 29 January 2026 · run 3 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query already reads history - it uses the combined dataset, which
#   needs the historical data add-on for this chain.
#
#   Without the add-on it fails with 'access restricted: your plan only allows
#   realtime'. Drop the dataset argument to fall back to the recent window.
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

{
  EVM(network: base, dataset: combined) {
    DEXTradeByTokens(
      where: {Block: {Date: {since: "2025-01-01"}}, 
        Trade: {Currency: {SmartContract: 
          {is: "0x9f86dB9fc6f7c9408e8Fda3Ff8ce4e78ac7a6b07"}},
          Side: {Currency: {SmartContract: {in: [
            "0x",
            "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "0x4200000000000000000000000000000000000006"]}}}, 
          AmountInUSD: {gt: "5"}}, TransactionStatus: {Success: true}}
      limitBy:{count:1 by:Trade_Side_Currency_SmartContract}
      orderBy: {descendingByField: "ath_price"}
    ) {
      Trade {
        PriceInUSD(maximum: Trade_PriceInUSD)
        Currency {
          Name
          Symbol
          SmartContract
        }
        Side {
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
      }
      ath_price: quantile(of: Trade_PriceInUSD, level: 0.95)
      ath_99: quantile(of: Trade_PriceInUSD, level: 0.99)
    }
  }
}

Similar queries