getWalletTrades

Returns the latest 1000 DEX trades on Ethereum, where block time since 2024-02-04 and block time till 2025-02-04: block hash, block number, block time, transaction hash, transaction index, sell seller, sell amount in USD and 17 more fields.

By Jose · saved 4 February 2025 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query getWalletTrades($dataset: dataset_arg_enum!, $network: evm_network!, $wallet: String!, $since: DateTime!, $till: DateTime!) {
  EVM(network: $network, dataset: $dataset) {
    DEXTrades(
      orderBy: {descending: Block_Time}
      limit: {count: 1000}
      where: {
        TransactionStatus: {Success: true},
        Block: {Time: {since: $since, till: $till}},
        any: [
          {Trade: {Sell: {Buyer: {is: $wallet}}}},
          {Trade: {Buy: {Seller: {is: $wallet}}}}
        ]
      }
    ) {
      Block {
        Hash
        Number
        Time
      }
      Transaction {
        Hash
        Index
      }
      Trade {
        Sell {
          Seller
          AmountInUSD
          Amount
          Buyer
          Currency {
            Decimals
            Name
            SmartContract
            Symbol
          }
          PriceInUSD
        }
        Buy {
          Buyer
          AmountInUSD
          Amount
          Currency {
            Decimals
            Name
            SmartContract
            Symbol
          }
          PriceInUSD
        }
        Dex {
          ProtocolFamily
          ProtocolName
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "dataset": "archive",
  "till": "2025-02-04T16:29:59.000Z",
  "since": "2024-02-04T00:00:00.000Z",
  "wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

Similar queries