PumpFun query for 1st page

Returns 100 DEX trades by token and DEX pools on Solana, where DEX protocol name is pump and block time since 2024-09-02, sorted by pool base post amount maximum: market address, currency symbol, currency name, currency mint address, trade price, count, sum of trade side amount in USD and 2 more fields.

By Aleksey · saved 2 September 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query($from: DateTime) {
  Solana(aggregates: only) {
    DEXTradeByTokens(
                  limit: {count: 100}
                  orderBy: {descendingByField: "Trade_lastPrice_maximum"}
                  where: {Block: {Time: {since: $from}}, Trade: {Currency: {Native: false}, Dex: {ProtocolName: {is: "pump"}}}, Transaction: {Result: {Success: true}}}
                ) {
                  Trade {
                    Market {
                      MarketAddress
                    }
                    Currency {
                      Symbol
                      Name
                      MintAddress
                    }
                    lastPrice: Price(maximum: Block_Slot)
                    prePrice: Price(minimum: Block_Slot)
                  }
                  count
                  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}}}}
                  )
                }
    
    DEXPools(
      orderBy: {
        ascendingByField: "Pool_Base_PostAmount_maximum"
      }
      limit: {count: 100}
      where: {
        Pool: {
          Dex: {
            ProtocolName: {
              is: "pump"
            }
          }
        }
      }
    ) {
      Pool {
        Market {
          BaseCurrency {
            MintAddress
          }
          MarketAddress
        }
        
       Base {
          PostAmount(maximum: Block_Slot selectWhere: {gt: "206900000"})
        }
      }

    }
  }
}

Variables

{
  "from": "2024-09-02T08:00:00Z"
}

Similar queries