k-line for ETH pair

Returns 100 DEX trades by token on Ethereum, where side currency smart contract is 0x6671…0a88, currency smart contract is 0xc02a…6cc2 and DEX protocol name is uniswap_v2, sorted by block time: block time, price in USD, smart contract, side smart contract, quantile of trade price in USD and sum of trade side amount in USD.

By Divyasshree · saved 19 December 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query tradingView {
  EVM(network: eth) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {TransactionStatus: {Success: true}, Trade: {Dex: {ProtocolName: {is: "uniswap_v2"}}, Side: {Currency: {SmartContract: {is: "0x667102bd3413bfeaa3dffb48fa8288819e480a88"}}}, Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}
      limit: {count: 100}
    ) {
      Block {
        Time
      }
      Trade {
        close: PriceInUSD(maximum: Transaction_Index)
        Currency {
          SmartContract
        }
        Side {
          Currency {
            SmartContract
          }
        }
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Similar queries