marketcap and liquidity

Returns the latest DEX pool on Solana: base post amount in USD, post balance in USD, currency name, currency mint address and currency symbol.

By SJ · saved 9 February 2025 · Bitquery API v2

What it returns

The query

query MyQuery($time_1h_ago: DateTime, $token: String, $side: String) {
  Solana {
    liquidity: DEXPools(
      where: {Pool: {Market: {BaseCurrency: {MintAddress: {is: $token}}, QuoteCurrency: {MintAddress: {is: $side}}}}}
      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",
  "side":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}

Similar queries