Transactions API
Get Wallet Transactions

Get Wallet Transactions

Overview

The Get Wallet Transactions endpoint obtains data on an EOA wallet's transaction history by specifying its address as a required path parameter. The range should be defined by either block_number, timestamp, or block_hash.

Use Cases

While the Wallet Transactions endpoint should always include an EOA wallet's address as a required path parameter, it can also be combined with other query parameters to further refine your search. Several possible combinations should be considered, where direction refers to the source or destination transaction address and counterparty is the EOA address on the opposite side of the chosen direction. To retrieve specific details about wallet transactions, follow the guidelines below.

  1. For incoming or outgoing transactions of a particular wallet, specify the corresponding value and add it to the path address parameter.

  2. For transactions from or to another EOA wallet, specify it as counterparty and add it to the path address parameter. The outgoing direction makes counterparty the destination or to address whereas the incoming direction makes counterparty the source or origin address.

Querying via Postman

If you prefer querying via Postman, the description of PARSIQ Endpoints for Get Wallet Transactions (opens in a new tab) might come in handy. There you will find examples and responses for good and bad requests as well as parameter definitions and their example values.

Usage

In this example, we receive all incoming transactions of the EOA wallet 0x34Ea809d0297bd3fdBCc8Ce16A928aF958D56EBD and its counterparty 0xbc30094ddb1ee0ed6288ada39dbe21db303c96f6 starting from the first block.

import * as Parsiq from '@parsiq/parsiq.js';
import {TransferDirection} from '@parsiq/parsiq.js';
 
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
 
const walletTransactions = client.transactions.byAddress.getByBlockRange(
    '0x34Ea809d0297bd3fdBCc8Ce16A928aF958D56EBD',
    1, 'latest',
    {
      counterparty: '0xbc30094ddb1ee0ed6288ada39dbe21db303c96f6',
      direction: TransferDirection.Incoming,
      include_logs: true
    },
    {
      limit: 1
    }
);
 
for await (const transaction of walletTransactions) {
    console.log(transaction);
}

Output:

{
  hash: '0x90e534743f2d438ba3f4fe789cd0f0d7c0a32605346895553e0965f80001526f',
  block_hash: '0x0cbe38e13acdd09cc2ab6891c35a296aa4518ddf21f513e46da82f71dbd569ae',
  block_timestamp: 1688615003,
  index: 51,
  block_number: 17632211,
  data: {
    origin: '0xbc30094ddb1ee0ed6288ada39dbe21db303c96f6',
    to: '0x34ea809d0297bd3fdbcc8ce16a928af958d56ebd',
    fee: '1149321719700000',
    nonce: 0,
    sig_r: '0xf2121a8c839addcc573463778e1e873d12fd307d029dde749dac45133a572e7e',
    sig_s: '0x3119c17b9c5ef41576a9dfdde87452232daa8bcadef2d5aabb80e48684d10816',
    sig_v: '0x01',
    status: true,
    tx_type: 2,
    gas_used: 21000,
    gas_limit: 21000,
    gas_price: '54729605700',
    gas_fee_cap: '63261523545',
    gas_tip_cap: '100000000',
    txn_fee_savings: '179170274745000'
  },
  logs: [
    {
      id: '00000000010d0bd3-0033-00000000',
      sender: '0xbc30094ddb1ee0ed6288ada39dbe21db303c96f6',
      sig_hash: null,
      op_code: 'CALL',
      value: '5498671508005555000',
      input_data: '0x',
      output_data: '0x',
      contract: '0x34ea809d0297bd3fdbcc8ce16a928af958d56ebd'
    }
  ],
  gas_range: [ 6003383, 6024383 ]
}

Parameters

Path params
chainId
string
REQUIRED
version
string
REQUIRED
address
string
REQUIRED
Query params
block_number_start
number
REQUIRED
block_number_end
string
number
REQUIRED
direction
string
counterparty
string
include_logs
boolean
offset
string
limit
number
estimate_cu
boolean