Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for solana token pair

Returns DEX trades by token on Solana, where currency mint address is 5i55YE…pump and DEX protocol name is pump: count and sum of trade side amount in USD.

By roger · saved 23 December 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String!, $time_24h_ago: DateTime!) {  Solana(dataset: realtime) {
    DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "pump"}}, Currency: {MintAddress: {is: $token}}}}    ) {
      buyers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      buyers24H: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after: $time_24h_ago}}}
      )
      sellers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      sellers24H: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after: $time_24h_ago}}}
      )
      volume24H: sum(
        of: Trade_Side_AmountInUSD
        if: {Block: {Time: {after: $time_24h_ago}}}
      )

      buys: count(if: {Trade: {Side: {Type: {is: buy}}}})
      buyTxs24H: count(
        if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after: $time_24h_ago}}}
      )
      sells: count(if: {Trade: {Side: {Type: {is: sell}}}})
      sellTxs24H: count(
        if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after: $time_24h_ago}}}
      )
    }
  }
}

Variables

{
  "token":"5i55YErSphKv1sbnc9ZjGLuxbKEiE2kXB1pV9Vz1pump",
  "side_token": "So11111111111111111111111111111111111111112",
  "pair_address": "4AZRPNEfCJ7iw28rJu5aUyeQhYcvdcNm8cswyL51AY9i",
  "time_24h_ago":"2024-12-22T15:13:00Z",
  "time_1h_ago": "2024-11-06T14:18:00Z"
}

Similar queries