mcap, liquidity, bonding curve, volume, supply of a token in time frame

Returns the latest DEX trade by token on Solana, where currency mint address is BQ2H4i…pump, side currency mint address is 111111…1111 and base currency mint address is BQ2H4i…pump: sum of trade side amount in USD, base currency name, base currency symbol, quote currency name, quote currency symbol, base post amount, base post amount in USD and 9 more fields.

By gaurav · saved 7 May 2025 · run 35 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}}, Transaction:{Result:{Success:true}}}
    ) {
      VolumeInUSD: sum(of: Trade_Side_AmountInUSD)
    }
    liquidity_and_BondingCurve: DEXPools(
      where: {Pool: {Market: {BaseCurrency: {MintAddress: {is: $token}}, QuoteCurrency: {MintAddress: {is: $side}}}} Transaction:{Result:{Success:true}}}
      limit: {count: 1}
      orderBy: {descending: Block_Time}
    ) {
      Pool {
        Market{
          BaseCurrency{
            Name
            Symbol
          }
          QuoteCurrency{
            Name
            Symbol
          }
        }
        Base {
          Balance:PostAmount
          PostAmountInUSD
        }
        Quote{
          PostAmount
          PostAmountInUSD
        }
      }
    }
    marketcap_and_supply: TokenSupplyUpdates(
      where: {TokenSupplyUpdate: {Currency: {MintAddress: {is: $token}}} Transaction:{Result:{Success:true}}}
      limitBy: {by: TokenSupplyUpdate_Currency_MintAddress, count: 1}
      orderBy: {descending: Block_Time}
    ) {
      TokenSupplyUpdate {
        MarketCap: PostBalanceInUSD
        Supply: PostBalance
        Currency {
          Name
          MintAddress
          Symbol
        }
      }
    }
    Price: DEXTradeByTokens(
      limit:{count:1}
      orderBy:{descending:Block_Time}
      where:{Transaction:{Result:{Success:true}} Trade:{Currency:{MintAddress:{is:$token}}}}
    ){
      Trade{
        Price
        PriceInUSD
      }
    }
  }
}

Variables

{
  "time_1h_ago": "2025-05-07T09:25:00Z",
  "token": "BQ2H4iunQzbhMQaUf65J5N7qVASX9JWf8oytTM2Gpump",
  "side": "11111111111111111111111111111111"
}

Similar queries