all trades of specific currency for a given time

Returns the latest 10 DEX trades on Ethereum, where buy currency is 0xd0b3…1a3d, time since 2023-07-09 and time till 2023-07-09: timestamp time, block height, trade index, protocol, full name, address address, annotation and 8 more fields.

By gaurav · saved 1 September 2023 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 10, offset: 0}
      time: {since: "2023-07-09T17:02:11Z", till: "2023-07-09T17:17:11Z"}
      buyCurrency: {is: "0xd0b3a986fff305854a7238a8e099cce1ced01a3d"}
    ) {
      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
      }
      PriceInUSD1: expression(get: "buy_amount_usd / buyAmount")
      PriceInUSD2: expression(get: "sell_amount_usd / buyAmount")
    }
  }
}

Similar queries