ohlc of a token pair on arbitrum

Returns DEX trades by token on Arbitrum, where currency smart contract is 0x93FA…B3E4, side currency smart contract is 0x82aF…Bab1 and block time since 2024-12-17, sorted by block time: block time, price in USD and sum of trade amount in USD.

By Akshat · saved 17 December 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: arbitrum, dataset: realtime) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {is: "0x93FA0B88C0C78e45980Fa74cdd87469311b7B3E4"}}, Side: {Currency: {SmartContract: {is: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}}}, PriceAsymmetry: {le: 0.1}}, Block: {Time: {since: "2024-12-17T06:50:00Z"}}}
      orderBy: {ascendingByField: "Block_Time"}
    ) {
      Block {
        Time(interval: {count: 1, in: minutes})
      }
      Trade{
					open: PriceInUSD(minimum:Block_Time)
        	close: PriceInUSD(maximum:Block_Time)
        	low: PriceInUSD(minimum: Trade_PriceInUSD)
        high: PriceInUSD(maximum:Trade_PriceInUSD)
      }
      volume: sum(of:Trade_AmountInUSD)
    }
  }
}

Similar queries