Copy of PANDORA USDT

Returns DEX trades by token on Ethereum, where side currency smart contract is 0x9E9F…0413, currency smart contract is 0xdac1…1ec7 and block time since 2024-12-16, 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 rb · saved 19 December 2024 · run 17 times · Bitquery API v2

What it returns

Filters

The query

query tradingViewPairs($network: evm_network, $dataset: dataset_arg_enum, $interval: Int, $token: String, $base: String, $time_ago: DateTime) {
  EVM(network: $network, dataset: $dataset) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $token}}}, Currency: {SmartContract: {is: $base}}}, Block: {Time: {since: $time_ago}}}
    ) {
      Block {
        Time(interval: {count: $interval, in: minutes})
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.1)
      max: quantile(of: Trade_PriceInUSD, level: 0.9)
      close: average(of: Trade_PriceInUSD)
      open: average(of: Trade_PriceInUSD)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "network": "eth",
  "base": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "token": "0x9E9FbDE7C7a83c43913BddC8779158F1368F0413",
  "time_ago": "2024-12-16T07:54:42Z",
  "dataset": "realtime",
  "interval": 5
}

Similar queries