Multiple_Tokens_Price_In_USD_V1

Returns DEX trades on Ethereum, where base currency is 0x5149…86CA, 0x9511…27cf or 2 more, sorted by block height transaction index, highest first: expression, block height, base amount, base currency address, base currency symbol, quote amount, quote currency address and 2 more fields.

By Omkar_BQ · saved 22 May 2024 · run 14 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "transaction.index"], limitBy: {each: "baseCurrency.address", limit: 1}}
      baseCurrency: {in: ["0x514910771AF9Ca656af840dff83E8264EcF986CA", "0x9511ff502f982643935a39206f98a6c18d4527cf", "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", "0x72e4f9f808c49a2a61de9c5896298920dc4eeea9"]}
    ) {
      USDPrice: expression(get: "quoteAmountUSD / baseAmount")
      block {
        height
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmountUSD: quoteAmount(in: USD)
      quoteCurrency {
        address
        symbol
      }
      transaction {
        index
      }
    }
  }
}

Similar queries