Dai - USDC and RLY - USDC

Returns the latest 5 DEX trades on Ethereum, where sell currency is 0xbb9f…5ff6 or 0xa0b8…eb48 and buy currency is 0x6b17…1d0f or 0xf1f9…e49b: buy amount, buy currency symbol, buy currency address, sell amount, sell currency symbol, sell currency address, price and block height.

By gaurav · saved 18 August 2023 · run 3 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height"], limit: 5, limitBy: {each: "buyCurrency.address", limit: 1}}
      sellCurrency: {in: ["0xbb9fd9fa4863c03c574007ff3370787b9ce65ff6", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}
      buyCurrency: {in: ["0x6b175474e89094c44da98b954eedeac495271d0f", "0xf1f955016ecbcd7321c7266bccfb96c68ea5e49b"]}
    ) {
      buyAmount
      buyAmountInUsd: buyAmount(in: USD)
      buyCurrency {
        symbol
        address
      }
      sellAmount
      sellAmountInUsd: sellAmount(in: USD)
      sellCurrency {
        symbol
        address
      }
      sellAmountInUsd: sellAmount(in: USD)
      price
      block {
        height
      }
    }
  }
}

Similar queries