getwallettransactions
description: >- Get all incoming and outgoing transactions for the given wallet address in reverse chronological order (most recent first)
getWalletTransactions
Explore how to efficiently retrieve a comprehensive transaction history for a specific wallet address using the 'getWalletTransactions' API method. Transactions are conveniently presented in reverse chronological order, showcasing the most recent transactions first. This API provides valuable insights into both incoming and outgoing wallet activity, empowering you to effectively track and manage transaction history.
How to use getWalletTransactions method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getWalletTransactions method effectively using Blast Builder API.
Field | Type | Description |
---|---|---|
walletAddress | string | The address of the wallet |
fromBlock | string | Indicate the starting block from which to get the transactions |
toBlock | string | Indicate ending block up to which to get the transactions |
secondWalletAddress | string | Filter transactions involving the given wallet address and a second address |
onlyIncoming | boolean | Return only incoming transfers. Default is false. If set to true, only incoming transactions are included. If set to true, onlyOutgoing must be false. |
onlyOutgoing | boolean | Return only outgoing transfers. Default is false. If set to true, only outgoing transactions are included. If set to true, onlyIncoming must be false. |
pageSize | integer | Number of records to be retrieved on one page |
pageKey | string | Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response |
Returns
In this section, you can find detailed information about the parameters returned by the getWalletTransactions
method, which offer insights into wallet transactions on the blockchain. These parameters encompass transaction details like transaction hashes, block information, sender and receiver addresses, gas-related data, transaction status, and more. Developers can leverage these parameters to gain a comprehensive understanding of a wallet's transaction history and execute various analyses or operations based on this valuable data.
Field | Type | Description |
---|---|---|
walletAddress | string | The wallet address of the holder |
count | integer | The number of transactions |
nextPageKey | string | Key to get the next page of results, if more results are available |
transactions | array | Array of Transaction objects |
transactionHash | string | The hash of the transaction |
transactionIndex | integer | The index of the transaction |
blockHash | string | The hash of the block containing the transaction |
blockNumber | integer | The height of the block containing the transaction |
blockTimestamp | string | The timestamp of the block in which the transfer transaction was executed |
fromAddress | string | The address executing the transaction |
toAddress | string | The address on the receiving end of the transaction |
nonce | integer | The number of transactions sent from the sender address |
minerAddress | string | The address of the validator that mined the block |
gasLimit | string | The maximum amount of gas you set for the transaction |
gasPrice | string | Price offered for each unit of gas used in the transaction, denoted in wei |
maxGasPrice | string | (optional, for type 2 transactions only) Absolute maximum price willing to pay for each unit of gas used in the transaction, including priority fee, as per EIP-1559, denoted in wei |
maxPriorityGasPrice | string | (optional, for type 2 transactions only) Maximum priority fee price willing to pay for each unit of gas used in the transaction, as per EIP-1559, denoted in wei |
effectiveGasPrice | string | Actual price paid for each unit of gas used in the transaction, denoted in wei |
transactionFee | string | Total amount paid for processing the transaction, denoted in wei |
gasUsed | string | The total amount paid for the transaction, a multiplication product of gasLimit and gasPrice |
value | string | The value being transacted |
l1GasInfo | Arbitrum | L1 gas and fee information |
gasUsedForL1 | string | The amount of gas used on L1 in units of L2 gas |
l1Fee | string | Fee paid on L1 to post the transaction, denoted in wei |
l1GasInfo | Base, Optimism | L1 gas and fee information |
l1GasUsed | string | The amount of gas used on L1 |
l1GasPrice | string | Price paid for each unit of L1 gas, denoted in wei |
l1FeeScalar | string | L1 fee scalar |
l1Fee | string | Fee paid on L1 to post the transaction, denoted in wei |
contractAddress | string | The address of the contract |
input | string | Additional data included for this transaction |
status | integer | The status for the transaction |
type | integer | The type of the transaction |
Example Request and Result for getWalletTransactions
In this section, we present an illustrative example of a request made using the 'getWalletTransactions' API method, along with a detailed breakdown of the resulting data. This example serves as a practical reference to demonstrate how to retrieve wallet transaction informations, helping you understand and utilize the API effectively.
The example in this section uses a non-existing project id.
Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
GET
https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletTransactions?
Query Parameters
Name | Type | Description |
---|---|---|
walletAddress | String | 0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee |
fromBlock | String | 18375873 |
pageSize | String | 10 |
toBlock | String | 18375873 |
- 200: OK Expand for a detailed response example
{
"wallet_address": "0x6ba5dd023815104325a7d6eae98a259f6ab44deb",
"count": 1,
"transactions": [{
"transactionHash": "0xf3b81285e4a638fc5d8a93b0e3b572da3035969b52f514300c7af01fe8aeb878",
"transactionIndex": 98,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0x6ba5dd023815104325a7d6eae98a259f6ab44deb",
"toAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"nonce": 36,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "69163",
"gasPrice": "6315248398",
"gasUsed": "46109",
"value": "0",
"contractAddress": null,
"input": "0xa9059cbb000000000000000000000000369986e70ffba1d2062a402c76dcb2d0ed35c346000000000000000000000000000000000000000000000000000000003689cac0",
"status": 1,
"type": 2
}]
}
Curl request example
curl --location 'https://eth-mainnet.blastapi.io/<project-id>/builder/getWalletTransactions?walletAddress=0x6Ba5DD023815104325a7d6EAE98A259f6ab44dEb&pageSize=10&fromBlock=18375873&toBlock=18375873'