Base ohlc

Returns the latest 10 DEX trades by token on Base, where DEX smart contract is 0x4DAd…a7E5, side currency smart contract is 0x4200…0006 and block time after 2024-07-25: block date, block time, sum of trade amount, trade price, currency name, protocol name, smart contract and 3 more fields.

By Christopher · saved 25 July 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: archive, network: base) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_datefield"}
      where: {Trade: {Dex: {SmartContract: {is: "0x4DAd1171096AbbA835bf1D377Bb4f580B8B4a7E5"}}, Side: {Currency: {SmartContract: {is: "0x4200000000000000000000000000000000000006"}}}}, Block: {Time: {after: "2024-07-25T00:00:31Z", before: "2024-07-25T10:23:49Z"}}}
      limit: {count: 10}
    ) {
      Block {
        datefield: Date(interval: {in: days, count: 1})
        close_time: Time(maximum: Block_Time)
        open_time: Time(minimum: Block_Time)
      }
      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)
        Currency {
          Name
        }
        Dex {
          ProtocolName
          SmartContract
        }
        Side {
          Currency {
            Name
            SmartContract
          }
        }
      }
      count
    }
  }
}

Similar queries