mcap liquidity volume of a token in time frame

Returns the latest DEX trade by token on Solana, where currency mint address is 98mb39…pump, side currency mint address is EPjFWd…Dt1v and base currency mint address is 98mb39…pump: sum of trade side amount in USD, base post amount in USD, post balance in USD, currency name, currency mint address and currency symbol.

By Kshitij Mahajan · saved 10 January 2025 · run 260 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($time_1h_ago: DateTime, $token: String, $side: String) {
  Solana {
    volume: DEXTradeByTokens(
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {is: $side}}}}, Block: {Time: {since: $time_1h_ago}}}
    ) {
      sum(of: Trade_Side_AmountInUSD)
    }
    liquidity: DEXPools(
      where: {Pool: {Market: {BaseCurrency: {MintAddress: {is: $token}}, QuoteCurrency: {MintAddress: {is: $side}}}}, Block: {Time: {till: $time_1h_ago}}}
      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