uniswap_token_ohlcv_

Returns DEX trades by token on Ethereum, where currency smart contract is 0x1f98…f984, side currency smart contract is 0x, 0xc02a…6cc2 or 2 more and block time since 2025-07-11, sorted by block time: block time, quantile of trade price in USD, average of trade price in USD and sum of trade side amount in USD.

By Omkar_BQ · saved 14 July 2025 · Bitquery API v2

What it returns

Filters

The query

query tradingView($network: evm_network, $dataset: dataset_arg_enum, $interval: Int, $from: DateTime, $to: DateTime, $token: String, $eth: String!, $weth: String!, $usdc: String!, $usdt: String!) {
  EVM(network: $network, dataset: $dataset) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {TransactionStatus: {Success: true}, Trade: {Side: {Currency: {SmartContract: {in: [$eth, $weth, $usdc, $usdt]}}}, Currency: {SmartContract: {is: $token}}, Success: true}, Block: {Time: {since: $from, till: $to}}}
    ) {
      Block {
        Time(interval: {count: $interval, in: seconds})
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      close: average(of: Trade_PriceInUSD)
      open: average(of: Trade_PriceInUSD)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "network": "eth",
  "token": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
  "eth": "0x",
  "usdc": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "usdt": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "weth": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "dataset": "realtime",
  "time_ago": "2025-07-11T13:25:16Z",
  "interval": 60,
  "from": "2025-07-11T13:26:29.000Z",
  "to": "2025-07-14T13:26:29.000Z"
}

Similar queries