test dogecoin for all time high

Returns DEX trades on Ethereum, where buy currency smart contract is 0x4206…668f, sell currency smart contract is 0xc02a…6cc2 and block time after 2021-10-01, sorted by trade buy ath maximum, highest first: buy currency name, buy amount, buy price, transaction hash and block time.

By Nikhil · saved 3 November 2023 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: archive, network: eth) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x4206931337dc273a630d328dA6441786BfaD668f"}}}, Sell: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}, Block: {Time: {after: "2021-10-01T00:00:00Z", before: "2022-10-01T00:00:00Z"}}}
      orderBy: {descendingByField: "Trade_Buy_ATH_maximum"}
      #Highest ATH comes at the top we can just limit it
    ) {
      Trade {
        Buy {
          Currency {
            Name
          }
          Amount
          ATH: Price(maximum: Block_Date)
          # Ignore ATL for now
          ATL: Price(minimum: Block_Date)
        }
      }
      Transaction {
        Hash
      }
      Block {
        Time
      }
    }
  }
}

Similar queries