trade on specific block height

Returns the latest 10 DEX trades on Ethereum, where buy currency is 0x956f…87ca, sell currency is 0xa0b8…eb48 and exchange name is Uniswap: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 16 May 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $exchange: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      height: {is: 14786214}
      exchangeName: {is: $exchange}
      buyCurrency: {is: "0x956f47f50a910163d8bf957cf5846d573e7f87ca"}
      sellCurrency: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      buyAmount
      buyCurrency {
        address
        symbol
      }
      sellAmount
      sellCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "exchange": "Uniswap",
  "from": "2022-05-09",
  "till": "2022-05-16T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries