price-and-priceChangeInUSD-for-innterval

Returns the latest DEX trades by token, where currency smart contract is 0xc02a…6cc2, block time since 2024-10-15 and block time till 2024-10-15: block time and price in USD.

By Kshitij Mahajan · saved 15 October 2024 · run 5 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String = "", $since: DateTime, $till: DateTime) {
  EVM {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {is: $token}}, PriceInUSD: {ne: 0}}, Block: {Time: {since: $since, till: $till}}}
      orderBy: {descending: Block_Time}
    ) {
      Block{
        Time
      }
      Trade {
        PriceInUSD
      }
    }
  }
}

Variables

{
  "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "since": "2024-10-15T08:30:00Z",
  "till": "2024-10-15T08:35:00Z"
}

Similar queries