pumpfun aggregate may example

Returns 200 DEX trades by token on Solana, where DEX protocol name is pump and block time since 2024-05-31, sorted by block date: count, unique of trade account owner, sum of trade side amount in USD and block date.

By Divyasshree · saved 3 January 2025 · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: archive, aggregates: yes) {
    DEXTradeByTokens(
      limit: {count: 200}
      orderBy: {ascending: Block_Date}
      where: {Trade: {Currency: {}, Dex: {ProtocolName: {is: "pump"}}}, Transaction: {Result: {Success: true}}, Block: {Time: {since: "2024-05-31T10:15:49Z"}}}
    ) {
      count
      traders: uniq(of: Trade_Account_Owner)
      buy_usd: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
      sell_usd: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      Block {
        Date
      }
    }
  }
}

Similar queries