buy trades of a specific token for a specific wallet

Returns DEX trades on Ethereum, where sell buyer is 0x417B…2fAd and sell currency smart contract is 0xcf0c…6a2e: block time, protocol name, protocol family, buy amount in USD, buy amount, buy buyer, buy currency name and 15 more fields.

By Akshat · saved 4 December 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: realtime) {
    DEXTrades(
      where: {Trade: {Sell: {Buyer: {is: "0x417B03A9A2Fe39cC4543057bE3509EBA77a92fAd"}, Currency: {SmartContract: {is: "0xcf0c122c6b73ff809c693db761e7baebe62b6a2e"}}}}, TransactionStatus: {Success: true}}
    ) {
      Block {
        Time
      }
      Trade {
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Buy {
          AmountInUSD
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          PriceInUSD
          Price
        }
        Sell {
          PriceInUSD
          Price
          AmountInUSD
          Amount
          Buyer
          Currency {
            Name
            ProtocolName
            Symbol
          }
          Seller
        }
      }
      Transaction {
        Hash
      }
    }
  }
}

Similar queries