pumpfun top tokens

Returns 20 DEX trades by token on Solana, where currency mint address is not So1111…1112 or EPjFWd…Dt1v, DEX protocol family is Pumpfun and block time after 2024-10-04, sorted by buy, highest first: currency symbol, currency name, currency mint address, price in USD and sum of trade side amount in USD.

By Nadia · saved 4 October 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query ($time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descendingByField: "buy"}
      where: {Trade: {Currency: {MintAddress: {notIn: ["So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]}}, Dex: {ProtocolFamily: {is: "Pumpfun"}}}, Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}}
      limit: {count: 20}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
        }
        price_last: PriceInUSD(maximum: Block_Slot)
        price_1h_ago: PriceInUSD(minimum: Block_Slot)
      }
      usd: sum(of: Trade_Side_AmountInUSD)
      buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
      sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
    }
  }
}

Variables

{
  "time_ago": "2024-10-04T05:29:27Z"
}

Similar queries