PumpFun tokens in range groupby

Solana PumpFun trades in the interval

Returns 100 DEX trades by token on Solana, where DEX protocol name is pump, trade price is above 1e-8 and trade price is below 4e-8: count, currency name, currency symbol, currency mint address, trade price and trade amount.

By Ivan Britvic · saved 24 May 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query PumpFunTokensInPriceRange ($gt: Float!, $lt:Float!, $since: DateTime!) {
  Solana {
    DEXTradeByTokens(
      limit: {count: 100},
      where: {
        Block: {
          Time: {
            since: $since,
          }
        },
        Trade: {
          Dex: {
            ProtocolName: {
              is: "pump"
            }
          },
          Price: {
            gt: $gt
            lt: $lt
          }
        },
        Transaction: {
          Result: {
            Success: true
          }
        }
      }
    ) {
      # These are aggregation metrics that will count per token
      uniqueTokens: count(distinct: Trade_Currency_MintAddress)
      totalTxCount: count
      totalBuys: count(if: {Trade: {Side: {Type: {is: buy}}}})
      totalSells: count(if: {Trade: {Side: {Type: {is: sell}}}})
      
      # Token info will be repeated, but we'll get counts
      Trade {
        Currency {
          Name
          Symbol
          MintAddress
        }
        Price
        Amount
      }
    }
  }
}

Variables

{
  "gt": 1e-8,
  "lt": 4e-8,
  "since": "2025-05-23T00:43:04Z"
}

Similar queries