hourly bnb/usdt price data

Returns 2000 DEX trades by token on BNB Chain, where side currency smart contract is 0x55d3…7955, currency smart contract is 0xbb4c…095c and block date since 2023-06-13, sorted by block time: chain ID, block time, sum of trade amount, trade price and count.

By Divyasshree N · saved 22 June 2023 · run 9 times · Bitquery API v2

What it returns

Filters

The query

query ($from: String, $till: String, $baseCurrency: String, $quoteCurrency: String) {
  EVM(dataset: combined, network: bsc) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Currency: {SmartContract: {is: $baseCurrency}}}, Currency: {SmartContract: {is: $quoteCurrency}}}, Block: {Date: {since: $from, till: $till}}}
      limit: {count: 2000}
    ) {
      ChainId
      Block {
        Time(interval: {in: hours, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
      count
    }
  }
}

Variables

{
  "from": "2023-06-13",
  "till": "2023-06-20",
  "baseCurrency": "0x55d398326f99059ff775485246999027b3197955",
  "quoteCurrency": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
}

Similar queries