count not working

Returns DEX pools on Solana, where quote currency mint address is So1111…1112 or 111111…1111, sorted by pool quote post amount, highest first: count, market address, base currency symbol, base currency name, base currency mint address, quote currency symbol, quote currency name and 8 more fields.

By gaurav · saved 19 February 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    DEXPools(
      orderBy: {descending: Pool_Quote_PostAmount}
      limitBy: {count: 1, by: Pool_Market_MarketAddress}
      where: {Pool: {Market: {BaseCurrency: {Name: {includesCaseInsensitive: "trump"}, Symbol: {includesCaseInsensitive: "trump"}}, QuoteCurrency: {MintAddress: {in: ["So11111111111111111111111111111111111111112", "11111111111111111111111111111111"]}}}}}
    ) {
      count(distinct: PoolEvent_Index)
      Pool {
        Market {
          MarketAddress
          BaseCurrency {
            Symbol
            Name
            MintAddress
          }
          QuoteCurrency {
            Symbol
            Name
            MintAddress
          }
        }
        Base {
          PostAmount
          PostAmountInUSD
          oldestPrice: Price(minimum: Block_Time)
          latestPrice: Price(maximum: Block_Time)
          HighestPrice: Price(maximum: Pool_Base_Price)
        }
        Quote {
          PostAmount
          PostAmountInUSD
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
      }
    }
  }
}

Similar queries