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, buyer, trade amount, currency name, currency symbol and 7 more fields.

By George · saved 31 May 2024 · run 3 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)
      Trade {
        Buyer
        Amount
        Currency {
          Name
          Symbol
        }
        Seller
        Price
        Sender
        Side {
          Currency {
            Name
            Symbol
          }
          Amount
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
      count
    }
  }
}

Similar queries