list of tokens pumpfun

Returns DEX trades by token and balance updates on Solana, where token owner is HBV9sA…9Sw8 and DEX protocol family is Pumpfun, sorted by balance update post balance maximum, highest first: currency symbol, currency name, currency mint address, protocol family, protocol name, program address, sum of trade amount and 2 more fields.

By Nadia · saved 15 July 2024 · run 14 times · Bitquery API v2

What it returns

Filters

The query

query TopTraders($account: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descendingByField: "usdBought"}
      where: {any: [{Trade: {Account: {Token: {Owner: {is: $account}}}}}, {Trade: {Side: {Account: {Address: {is: $account}}}}}], Trade: {Currency: {Native: false}, Dex: {ProtocolFamily: {is: "Pumpfun"}}}, Transaction: {Result: {Success: true}}}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
        }
        Dex {
          ProtocolFamily
          ProtocolName
          ProgramAddress
        }
      }
      amountBought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      amountSold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      usdBought: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      usdSold: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
    }
    balanceCurrent: BalanceUpdates(
      orderBy: {descendingByField: "BalanceUpdate_PostBalance_maximum"}
      where: {BalanceUpdate: {Currency: {Native: false}, Account: {Token: {Owner: {is: $account}}}}}
    ) {
      BalanceUpdate {
        Currency {
          Symbol
          Name
          MintAddress
        }
        PostBalance(maximum: Block_Slot)
      }
    }
  }
}

Variables

{
  "account": "HBV9sARNHeCZcLpMZ7jt9hagjBoRPnuGPZPfdE249Sw8"
}

Similar queries