Price

Returns the latest DEX trade on Ethereum and BNB Chain, where quote currency is 0x55d3…7955 and base currency is 0xec1f…955c: quote price, expression, block height, trade index, address address, base amount, base currency address and 5 more fields.

By Omkar Acharekar · saved 24 August 2023 · run 4 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      quoteCurrency: {is: "0x55d398326f99059ff775485246999027b3197955"}
      baseCurrency: {is: "0xec1f55b5be7ee8c24ee26b6cc931ce4d7fd5955c"}
    ) {
      quotePrice
      USDPrice: expression(get: "quoteAmountUSD / baseAmount")
      block {
        height
      }
      tradeIndex
      smartContract {
        address {
          address
        }
      }
      baseAmountUSD:baseAmount(in: USD)
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmountUSD:quoteAmount(in: USD)
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Similar queries