ETHx -OHLC data

Returns the latest 10000 DEX trades by token, where side currency smart contract is 0xA35b…A15b and currency smart contract is 0xc02a…6cc2: block time, sum of trade amount, trade price and count.

By Nitin Jakhar · saved 24 November 2023 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      where: {Trade: {Side: {Currency: {SmartContract: {is: "0xA35b1B31Ce002FBF2058D22F30f95D405200A15b"}}}, 
        Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}
      limit: {count: 10000}
    ) {
      Block {
        Time(interval: {in: minutes, count: 10})
      }
      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
    }
  }
}

Similar queries