pricechange,price,volume

Returns pairs, where token ID is bid:solana:BTr5SwWSKPBrdUzboi2SVr1QvSjmh1caCYUkxsxLpump and time duration is 1: token ID, token name, token symbol, mean, calculate and sum of volume USD.

By Akshat · saved 11 March 2026 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query{
  TokenAsBase: Trading {
    Pairs(
      where: {Interval: {Time: {Duration: {eq: 1}}}, Block: {Time: {since_relative: {hours_ago: 24}}}, Price: {IsQuotedInUsd: true}, Token: {Id: {in: ["bid:solana:BTr5SwWSKPBrdUzboi2SVr1QvSjmh1caCYUkxsxLpump"]}}}
    ) {
      Token {
        Id
        Name
        Symbol
      }
      Price {
        Average {
          currentPrice: Mean(maximum: Block_Time)
          H1Ago: Mean(
            maximum: Block_Time
            if: {Block: {Time: {till_relative: {hours_ago: 1}}}}
          )
          H4Ago: Mean(
            maximum: Block_Time
            if: {Block: {Time: {till_relative: {hours_ago: 4}}}}
          )
          H24Ago: Mean(
            minimum: Block_Time
            if: {Block: {Time: {after_relative: {hours_ago: 24}}}}
          )
        }
      }
      Price_change_1h: calculate(expression: "( ( $Price_Average_currentPrice - $Price_Average_H1Ago ) / $Price_Average_H1Ago ) * 100")
      Price_change_4h: calculate(expression: "( ( $Price_Average_currentPrice - $Price_Average_H4Ago ) / $Price_Average_H4Ago ) * 100")
      Price_change_24h: calculate(expression: "( ( $Price_Average_currentPrice - $Price_Average_H24Ago ) / $Price_Average_H24Ago ) * 100")
      v1h: sum(of: Volume_Usd, if: {Block: {Time: {since_relative: {hours_ago: 1}}}})
      v4h: sum(of: Volume_Usd, if: {Block: {Time: {since_relative: {hours_ago: 4}}}})
      v24h: sum(of: Volume_Usd)
    }
  }
}

Similar queries