TRON EVM token price

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

By Aleksey · saved 30 September 2024 · Bitquery API v2

What it returns

Filters

The query

query tradingView($network: evm_network, $token: String, $eth: String!, $weth: String!, $usdc: String!, $usdt: String!) {
  EVM(network: $network) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {
        Side: {
          Currency: {
            SmartContract: {
              in: [$eth,$weth,$usdc,$usdt]
            }
          }
        }
        
        Currency: {SmartContract: {is: $token}}}}
    ) {
      Block {
        Time(interval: {count: 5, in: minutes})
      }
      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_Amount)
    }
  }
}

Variables

{
  "network": "eth",
  "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "usdc": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "usdt": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "weth": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "eth": "0x"
}

Similar queries