trades for a given address

Returns the latest 10 DEX trades on Ethereum, where date since 2022-10-11 and date till 2022-10-18: timestamp time, block height, trade index, protocol, full name, address address, annotation and 8 more fields.

By gaurav · saved 18 October 2022 · run 5 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      any: [{txSender: {is: "0x8d69826509fd99fa2f64d6d46782c7c65608ca87"}}, {taker: {is: "0x8d69826509fd99fa2f64d6d46782c7c65608ca87"}}]
    ) {
      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
        txFrom {
          address
        }
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "from": "2022-10-11",
  "till": "2022-10-18T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries