usdt all time high and low price api template

Get All time high and low price of USDT (Tether) token on Ethereum network aggregated on multiple DEXs

By Nikhil · saved 7 July 2023 · run 1 time · Bitquery API v2

What it returns

Filters

The query

# OHLC data for any token where Base Currency is WETH
# WETH: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

query ($token: String) {
  EVM(network: eth, dataset: combined) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}, Side: {Currency: {SmartContract: {is: $token}}}}, Block: {Date: {since: "2021-01-13", till: "2023-06-20"}}}
      limit: {count: 10}
    ) {
      ChainId
      Block {
        Time(interval: {in: years, count: 30})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
        Side {
          Currency {
            Symbol
          }
        }
        Currency {
          Symbol
        }
      }
      count
    }
  }
}

Variables

{
  "token": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}

Similar queries