How can I retrieve the history of trades associated with a specific address on the blockchain?

Returns 20 DEX trades on Ethereum, where maker or taker is 0x9a46…9bbe, date since 2023-04-13 and date till 2023-04-20: sell currency symbol, sell currency address, sell amount, buy currency symbol, buy currency address and buy amount.

By Oluwatomisin · saved 20 April 2023 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime, $address: String!) {
  ethereum(network: $network) {
    dexTrades(
      options: { limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      makerOrTaker: {is: $address}
    ) {
      sellCurrency {
        symbol
        address
      }
      sellAmount
      buyCurrency {
        symbol
        address
      }
      buyAmount
  
   

  
    }
  }
}

Variables

{
  "limit": 20,
  "offset": 0,
  "network": "ethereum",
  "address": "0x9a46619ab761b19c662843fbc0105b3e28249bbe",
  "from": "2023-04-13",
  "till": "2023-04-20T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries