Skip to main content

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.

FieldTypeDescription
walletAddressstringThe address of the wallet
fromBlockstringIndicate the starting block from which to get the transactions
toBlockstringIndicate ending block up to which to get the transactions
secondWalletAddressstringFilter transactions involving the given wallet address and a second address
onlyIncomingbooleanReturn only incoming transfers. Default is false. If set to true, only incoming transactions are included. If set to true, onlyOutgoing must be false.
onlyOutgoingbooleanReturn only outgoing transfers. Default is false. If set to true, only outgoing transactions are included. If set to true, onlyIncoming must be false.
pageSizeintegerNumber of records to be retrieved on one page
pageKeystringKey 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.

FieldTypeDescription
walletAddressstringThe wallet address of the holder
countintegerThe number of transactions
nextPageKeystringKey to get the next page of results, if more results are available
transactionsarrayArray of Transaction objects
transactionHashstringThe hash of the transaction
transactionIndexintegerThe index of the transaction
blockHashstringThe hash of the block containing the transaction
blockNumberintegerThe height of the block containing the transaction
blockTimestampstringThe timestamp of the block in which the transfer transaction was executed
fromAddressstringThe address executing the transaction
toAddressstringThe address on the receiving end of the transaction
nonceintegerThe number of transactions sent from the sender address
minerAddressstringThe address of the validator that mined the block
gasLimitstringThe maximum amount of gas you set for the transaction
gasPricestringPrice offered for each unit of gas used in the transaction, denoted in wei
maxGasPricestring(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
maxPriorityGasPricestring(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
effectiveGasPricestringActual price paid for each unit of gas used in the transaction, denoted in wei
transactionFeestringTotal amount paid for processing the transaction, denoted in wei
gasUsedstringThe total amount paid for the transaction, a multiplication product of gasLimit and gasPrice
valuestringThe value being transacted
l1GasInfoArbitrumL1 gas and fee information
gasUsedForL1stringThe amount of gas used on L1 in units of L2 gas
l1FeestringFee paid on L1 to post the transaction, denoted in wei
l1GasInfoBase, OptimismL1 gas and fee information
l1GasUsedstringThe amount of gas used on L1
l1GasPricestringPrice paid for each unit of L1 gas, denoted in wei
l1FeeScalarstringL1 fee scalar
l1FeestringFee paid on L1 to post the transaction, denoted in wei
contractAddressstringThe address of the contract
inputstringAdditional data included for this transaction
statusintegerThe status for the transaction
typeintegerThe 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.

info

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

NameTypeDescription
walletAddressString0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee
fromBlockString18375873
pageSizeString10
toBlockString18375873
{
"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'