limit by example with more than 1 field

Returns the latest 10 DEX trades on Ethereum, where date since 2022-12-27 and date till 2023-01-03: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 3 January 2023 · run 2 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 10, offset: 0, limitBy: {each: "buyCurrency.address,sellCurrency.address", limit: 1}}
      date: {since: "2022-12-27", till: "2023-01-03"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      buyAmount
      buyCurrency {
        address
        symbol
      }
      buy_amount_usd: buyAmount(in: USD)
      sellAmount
      sellCurrency {
        address
        symbol
      }
      sell_amount_usd: sellAmount(in: USD)
      transaction {
        hash
      }
    }
  }
}

Similar queries