price data for past 7days

Returns the latest 7 DEX trades by token on Ethereum, where currency smart contract is 0xdac1…1ec7, block date after 2024-11-27 and trade price asymmetry is at most 0.1: block time, block date and price in USD.

By Karan yadav · saved 4 December 2024 · Bitquery API v2

What it returns

Filters

The query

query tradingView($network: evm_network, $token: String, $date: String) {
   EVM(network: $network, dataset: combined) {
      DEXTradeByTokens(
         orderBy: { descendingByField: "Block_Time" }
         where: { Trade: { Currency: { SmartContract: { is: $token } }, PriceAsymmetry: { le: 0.1 } }, Block: { Date: { after: "2024-11-27" } } }
         limit: { count: 7 }
      ) {
         Block {
            Time(interval: { count: 1, in: days })
            Date(selectWhere: { since: $date })
         }
         Trade {
            open: PriceInUSD(minimum: Block_Number)
            close: PriceInUSD(maximum: Block_Number)
            max: PriceInUSD(maximum: Trade_PriceInUSD)
            min: PriceInUSD(minimum: Trade_PriceInUSD)
         }
      }
   }
}

Variables

{
  "network": "eth",
  "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}

Similar queries