ohlc bsc historical

Returns the latest 100 DEX trades by token on BNB Chain, where currency smart contract is 0x55d3…7955, side currency smart contract is 0x or 0x55d3…7955 and block date till 2025-06-20: block time, price in USD and sum of trade side amount in USD.

By Divyasshree · saved 4 July 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query tradingView($network: evm_network, $token: String, $to: String) {
  EVM(network: $network, dataset: combined, aggregates: yes) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_timefield"}
      limit: {count: 100}
      where: {Trade: {Currency: {SmartContract: {is: $token}}, PriceAsymmetry: {lt: 0.1}, Side: {Currency: {SmartContract: {in: ["0x", "0x55d398326f99059ff775485246999027b3197955"]}}}}, Block: {Date: {till: $to}}}
    ) {
      Block {
       timefield: Time(interval: {count: 1440, in: minutes})
      }
      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": "0x55d398326f99059ff775485246999027b3197955",
    "to": "2025-06-20"
}

Similar queries