5min volume and marketcap

Returns DEX trades by token on Solana, where side currency mint address is So1111…1112 and DEX protocol name is pump or pump_amm: sum of trade side amount in USD and post balance in USD.

By gaurav · saved 24 April 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($time_5min_ago: DateTime!, $tokenAddressList: [String!]) {
  Solana(dataset: realtime) {
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {in: $tokenAddressList}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}, Dex: {ProtocolName: {in: ["pump", "pump_amm"]}}}, Block: {Time: {since: $time_5min_ago}}}
    ) {
      traded_volume_5min: sum(of: Trade_Side_AmountInUSD)
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      joinTokenSupplyUpdates(
        TokenSupplyUpdate_Currency_MintAddress: Trade_Currency_MintAddress
        join:inner
        orderBy: {descending: Block_Time}
        limit: {count: 1}
      ) {
        TokenSupplyUpdate {
          PostBalanceInUSD
        }
      }
    }
  }
}

Variables

{
  "time_5min_ago": "2025-04-24T07:28:00Z",
  "tokenAddressList": ["EKE4cyTKey5WNMYeCuP5D21ByimwQj634wHweNMbpump","Ar3CWwj4sxb5riXhMsszmLquQpd2SztFk5fjcp9Bpump","h1X67PWf3fNi4xPuGz1GHmhLfkneiwfLautXBExpump"]

Similar queries