Tokens by liquidity

Returns 10 DEX pools on Solana, where program name is pump_amm, block time since 2025-05-04 and quote post amount in USD is at least 30000, sorted by pool base post amount in USD, highest first: market address, base currency symbol, base currency name, base currency mint address, quote currency symbol, quote currency mint address, quote post amount in USD and 5 more fields.

By Alex · saved 9 June 2025 · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    tokens: DEXPools(
      limit: {count: 10}
      where: {Pool: {Quote: {PostAmountInUSD: {ge: "30000", le: "500000"}}, Base: {PostAmountInUSD: {ge: "30000", le: "500000"}}}, Block: {Time: {since: "2025-05-04T00:00:00Z"}}, Instruction: {Program: {Name: {is: "pump_amm"}}}}
      limitBy: {by: Pool_Market_BaseCurrency_MintAddress, count: 1}
      orderBy: {descending: Pool_Base_PostAmountInUSD}
    ) {
      Pool {
        Market {
          MarketAddress
          BaseCurrency {
            Symbol
            Name
            MintAddress
          }
          QuoteCurrency {
            Symbol
            MintAddress
          }
        }
        Quote {
          PostAmountInUSD
        }
        Base {
          PostAmountInUSD
        }
      }
      trades: joinDEXTradeByTokens(
        Trade_Market_MarketAddress: Pool_Market_MarketAddress
        Trade_Currency_MintAddress: Pool_Market_BaseCurrency_MintAddress
        where: {Transaction: {Result: {Success: true}}, Block: {Time: {since: "2025-06-04T04:53:59Z"}}}
      ) {
        Trade {
          openPrice: PriceInUSD(minimum: Block_Time)
          currentPrice: PriceInUSD(maximum: Block_Time)
        }
        volumeUSD: sum(of: Trade_AmountInUSD)
        transactionCount: count(distinct: Transaction_Signature)
        buyCountAll: count(if: {Trade: {Side: {Type: {is: buy}}}})
        buyCountMore10USD: count(if: {Trade: {Side: {Type: {is: buy}}, AmountInUSD: {ge: "10"}}})
        sellCountAll: count(if: {Trade: {Side: {Type: {is: sell}}}})
        sellCountMore10USD: count(if: {Trade: {Side: {Type: {is: sell}}, AmountInUSD: {ge: "10"}}})
        buyVolume: sum(
          of: Trade_Side_AmountInUSD
          if: {Trade: {Side: {Type: {is: buy}}}}
        )
        sellVolume: sum(
          of: Trade_Side_AmountInUSD
          if: {Trade: {Side: {Type: {is: sell}}}}
        )
        uniqueBuyers: count(
          distinct: Transaction_Signer
          if: {Trade: {Side: {Type: {is: buy}}}}
        )
        uniqueSellers: count(
          distinct: Transaction_Signer
          if: {Trade: {Side: {Type: {is: sell}}}}
        )
      }
    }
  }
}

Similar queries