Copy of ohlc_base

Returns DEX trades by token on Base, where side currency smart contract is 0x50c5…B0Cb and currency smart contract is 0x8335…2913, sorted by block time: block time, block number, sum of trade amount, trade price and count.

By George · saved 3 June 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: realtime, network: base) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Currency: {SmartContract: {is: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb"}}}, Currency: {SmartContract: {is: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}}}
    ) {
      Block {
        Time(interval: {in: minutes, count: 10})
        lastTradeTime: Time(maximum: Block_Time)
        FirstTradeTime: Time(minimum: Block_Time)
        LastTradeBlock: Number(maximum: Block_Number)
        FirstTradeBlock: Number(minimum: Block_Number)
      }
      volume: sum(of: Trade_Amount)
      movingVoume:sum(of: Trade_Amount if:{
        Block:{Time: {after:"2024-06-03T06:00:00Z"}}
      })
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
      count
    }
  }
}

Similar queries