CAKE/USDT Current Price

Cake Currency Price using Cake-USDT Pair

Returns one address detail on Ethereum and BNB Chain, where address is 0xb309…49e6, base currency is 0xb309…49e6 and quote currency is 0x55d3…7955, sorted by block height transaction index, highest first: currency symbol, currency name, decimals, token type, block height, timestamp time, transaction index and 3 more fields.

By Santhosh · saved 14 September 2021 · Bitquery API v1

What it returns

Filters

The query

query($token: String, $currency: String){
  ethereum(network: bsc) {
    address(address: {is: $token}) {
      smartContract {
      currency {
          symbol
          name
          decimals
          tokenType
        }
      }
    }
    dexTrades(
      baseCurrency: {is: $token}
      quoteCurrency: {is: $currency}
      options: {desc: ["block.height", "transaction.index"], limit: 1}
    ) {
      
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      transaction {
        index
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
    }
  }
}

Variables

{
  "token": "0xb3095e21d3885e38da5ca0ee9e1566e5538f49e6",
  "currency": "0x55d398326f99059ff775485246999027b3197955"
}

Similar queries