Celo token price

This API provides the latest USDT token price in USD for Ethereum blockchain using DEXs like Uniswap, Balancer. You can also get the price of USDT Token at any previous date or time. You can also specify a specific exchange to get the price from using the filter.

By Aparna Sridhar · saved 25 January 2024 · run 19 times · Bitquery API v1

What it returns

Filters

The query

query get_token_price_in_usd($token: String) {
  ethereum(network: celo_mainnet) {
    dexTrades(
      baseCurrency: {is: $token}
      quoteCurrency: {is: "cGLD"}
      options: {desc: ["block.height"], limit: 1}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
      quoteAmountInUSD: quoteAmount(in: USD)
      baseAmount
      quotePriceInUSD: expression(get: "quoteAmountInUSD / baseAmount")
      exchange {
        fullNameWithId
        address {
          address
          annotation
        }
      }
    }
  }
}

Variables

{
  "token":"0x62b8b11039fcfe5ab0c56e502b1c372a3d2a9c7a"
}

Similar queries