Skip to main content

getWalletTokenTransfers

Efficiently access a complete history of ERC20 token transfers, encompassing both incoming and outgoing transactions, specifically related to the provided wallet address. The information is meticulously sorted in reverse chronological order, ensuring that the most recent transfers are prominently displayed at the beginning of the list. This capability offers valuable insights into the token movement associated with the wallet, providing a comprehensive view of transaction activity over time.

How to use getWalletTokenTransfers method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getWalletTokenTransfers method effectively using Blast Builder API.

Parameters

FieldTypeDescription
walletAddressstringThe address of the wallet
contractAddressstringThe address of the ERC20 token contract
fromBlockstringIndicate the starting block from which to get the transfers
toBlockstringIndicate ending block up to which to get the transfers
secondWalletAddressintegerFilter transfers involving the given wallet address and a second address
onlyIncomingbooleanReturn only incoming transfers. Default is false. If set to true, only incoming token transfers are included. If set to true, onlyOutgoing must be false.
onlyOutgoingbooleanReturn only outgoing transfers. Default is false. If set to true, only outgoing token transfers 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 will find a comprehensive list of parameters returned as part of the response for the 'getWalletTokenTransfers' API method. These parameters provide essential information about ERC20 token transfers, including details about the wallet, token contracts, transfer values, and blockchain block-related data. This information is valuable for tracking and analyzing token transfer activity associated with the provided wallet address

info

Returns array of Token Transfer objects.

This API is paginated, response items are ordered descending by:

  • blockNumber
  • transferIndex
FieldTypeDescription
walletAddressstringThe address of the wallet
countintegerThe number of allowances
nextPageKeystringKey used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response
tokenTransfersarrayThe array of Token Transfer objects
contractAddressstringThe token contract address
contractDecimalsstringToken decimals specified in the contract
contractNamestringThe name of the token
contractSymbolsstringThe symbol of the token
fromAddressstringAddress from which the transfer originated
toAddressarrayDestination address for the transfer (multiple allowed)
valuestringToken amount
blockHashstringThe hash of the block
blockNumberintegerThe block height
blockTimestampstringThe timestamp of the block
transactionHashstringThe hash of the transaction
transactionIndexintegerThe index of the transaction
logIndexintegerThe index of the log

Example Request and Result for getWalletTokenTransfers

In this section, we present an illustrative example of a request made using the 'getWalletTokenTransfers' API method, along with a detailed breakdown of the resulting data. This example serves as a practical reference to demonstrate how to retrieve token transfer information, 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!

Curl request example

curl --location 'https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletTokenTransfers?walletAddress=0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee&contractAddress=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'