marketcap and liquidity

Returns the latest DEX pool on Solana, where quote currency mint address is So1111…1112: base post amount in USD, post balance in USD, currency name, currency mint address and currency symbol.

By Shawn · saved 25 February 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($time_1h_ago: DateTime, $token: String) {
  Solana {
    liquidity: DEXPools(
      where: {Pool: {Market: {BaseCurrency: {MintAddress: {is: $token}}, QuoteCurrency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}}
      limit: {count: 1}
      orderBy: {descending: Block_Time}
    ) {
      Pool {
        Base {
          PostAmountInUSD
        }
      }
    }
    marketcap: TokenSupplyUpdates(
      where: {TokenSupplyUpdate: {Currency: {MintAddress: {is: $token}}}, Block: {Time: {till: $time_1h_ago}}}
      limitBy: {by: TokenSupplyUpdate_Currency_MintAddress, count: 1}
      orderBy: {descending: Block_Time}
    ) {
      TokenSupplyUpdate {
        PostBalanceInUSD
        Currency {
          Name
          MintAddress
          Symbol
        }
      }
    }
  }
}

Variables

{
  "time_1h_ago": 2025-01-10T10:07:00Z,
  "token":"98mb39tPFKQJ4Bif8iVg9mYb9wsfPZgpgN1sxoVTpump",
 
}

Similar queries