Percentage price change for a token

Returns DEX trades by token on BNB Chain, where currency smart contract is 0x9b48…0d40: currency name, currency symbol, smart contract, price in USD and calculate.

By Kshitij Mahajan · saved 2 September 2025 · run 5 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($currency: String) {
  EVM(network: bsc) {
    DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {
            SmartContract: {is: $currency}
          },
          Success: true
        }, 
        Block: {
          Time: {since_relative: {hours_ago: 24}}
        }
      }
    ) {
      Trade {
        Currency {
          Name
          Symbol
          SmartContract
        }
        price_24hr: PriceInUSD(minimum: Block_Time)
        price_1hr: PriceInUSD(if: {Block: {Time: {is_relative: {hours_ago:1}}}})
        price_5min: PriceInUSD(if: {Block: {Time: {is_relative: {minutes_ago:1}}}})
        current: PriceInUSD
      }
      change_24hr: calculate(expression: "( $Trade_current - $Trade_price_24hr ) / $Trade_price_24hr * 100")
      change_1hr: calculate(expression: "( $Trade_current - $Trade_price_1hr ) / $Trade_price_1hr * 100")
      change_5min: calculate(expression: "( $Trade_current - $Trade_price_5min ) / $Trade_price_5min * 100")
    }
  }
}

Variables

{
  "currency": "0x9b48a54bcce09e59b0479060e9328ab7dbdb0d40"
}

Similar queries