Copy of OHLC for a token on bsc

Returns DEX trades by token on BNB Chain, where currency smart contract is 0x9810…a408, block time since 2025-10-11 and block time till 2025-10-22, sorted by block time: block time, price in USD and sum of trade side amount in USD.

By liwei chen · saved 21 October 2025 · Bitquery API v2

What it returns

Filters

The query

query tradingView($network: evm_network, $token: String) {
  EVM(network: $network) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Currency: {SmartContract: {is: $token}} } 
,
        Block: {
          Time: {
            since: "2025-10-11T00:00:00Z",
            till: "2025-10-22T23:59:59Z"
          }
        }
 }
    ) {
      Block {
        Time(interval: {count: 1, in: days}   )
      }
      Trade {
        open: PriceInUSD(minimum: Block_Number)
        close: PriceInUSD(maximum: Block_Number)
        max: PriceInUSD(maximum: Trade_PriceInUSD)
        min: PriceInUSD(minimum: Trade_PriceInUSD)
      }
      volume: sum(of: Trade_Side_AmountInUSD, selectWhere: {gt: "0"})
    }
  }
}

Variables

{
  "network": "bsc",
  "token": "0x9810681b9cc70e963b08f8a414f60a2bccc9a408"
}

Similar queries