All Liquidity pairs of a token and current liquidity on solana

Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: Solana(dataset: combined) archive full history combined archive + realtime in one result Archive and c

By gaurav · saved 13 June 2025 · run 542 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query uses the realtime dataset (the default), which holds only a
#   recent window - hours to days depending on the cube.
#
#   For older data add a dataset to the top-level element:
#
#     Solana(dataset: combined)
#
#     archive   full history
#     combined  archive + realtime in one result
#
#   Archive and combined need the historical data add-on:
#   https://bitquery.io/pricing
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query ($base: String, $quote: String, $time_ago: DateTime) {
  Solana {
    DEXPools(
      orderBy: {descendingByField: "Pool_Quote_PostAmountInUSD_maximum"}
      where: {Transaction: {Result: {Success: true}}, 
        Pool: {Market: {BaseCurrency: {MintAddress: {is: $base}}, 
          QuoteCurrency: {MintAddress: {is: $quote}}}}, 
        Block: {Time: {after: $time_ago}}}
      limit: {count: 100}
    ) {
      Pool {
        Dex {
          ProtocolFamily
        }
        Market {
          MarketAddress
        }
        Base {
          PostAmount(maximum: Block_Slot)
          PostAmountInUSD(maximum: Block_Slot)
        }
        Quote {
          PostAmount(maximum: Block_Slot)
          PostAmountInUSD(maximum: Block_Slot)
        }
      }
    }
  }
}

Variables

{
  "base": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
  "quote": "So11111111111111111111111111111111111111112",
  "time_ago": "2025-06-13T04:46:49Z"
}

Similar queries