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.
-
For
incoming
oroutgoing
transactions of a particular wallet, specify the corresponding value and add it to the pathaddress
parameter. -
For transactions from or to another EOA wallet, specify it as
counterparty
and add it to the pathaddress
parameter. Theoutgoing
direction makescounterparty
the destination orto
address whereas theincoming
direction makescounterparty
the source ororigin
address.
Usage
In this example, we receive data on the entire transaction history of the
0x34Ea809d0297bd3fdBCc8Ce16A928aF958D56EBD
address starting from the first
block.
import * as Parsiq from '@parsiq/parsiq.js';
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
const transactions = client.transactions.byAddress.getByBlockRange('0x34Ea809d0297bd3fdBCc8Ce16A928aF958D56EBD', 1, 'latest', {});
for await (const transaction of transactions) {
console.log(transaction);
}
Output:
{
hash: '0x4679cb051f75ca89a0dd39f9b842014a0a7c33294e31acb8881e2b4ba9a19595',
block_hash: '0xc1454477b49a040ad9e193786b06318f0efaed1bbe2869147e390af30602a54d',
block_timestamp: 1688640611,
index: 122,
block_number: 17634323,
data: {
origin: '0x34ea809d0297bd3fdbcc8ce16a928af958d56ebd',
to: '0x4a48e3fc61f9569dca787b4512a612dd4a4e89bb',
fee: '499483179783000',
nonce: 12,
sig_r: '0x0250b6f4f7acbd094e1d553b5571cddd8da9b81db73c6251ac3f81e9b5a764d8',
sig_s: '0x606c85e2aee71e3c3ba282605e2d1aabcf15446ae39d56d02962df22c455ff22',
sig_v: '0x',
status: true,
tx_type: 2,
gas_used: 21000,
gas_limit: 21000,
gas_price: '23784913323',
gas_fee_cap: '30562283257',
gas_tip_cap: '100000000',
txn_fee_savings: '142324768614000'
},
gas_range: [ 8857818, 8878818 ]
}
Parameters
chainId
version
address
block_number_start
block_number_end
direction
counterparty
include_logs
offset
limit
estimate_cu