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
Field | Type | Description |
---|---|---|
walletAddress | string | The address of the wallet |
contractAddress | string | The address of the ERC20 token contract |
fromBlock | string | Indicate the starting block from which to get the transfers |
toBlock | string | Indicate ending block up to which to get the transfers |
secondWalletAddress | integer | Filter transfers involving the given wallet address and a second address |
onlyIncoming | boolean | Return only incoming transfers. Default is false. If set to true, only incoming token transfers 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 token transfers 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 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
Returns array of Token Transfer objects.
This API is paginated, response items are ordered descending by:
- blockNumber
- transferIndex
Field | Type | Description |
---|---|---|
walletAddress | string | The address of the wallet |
count | integer | The number of allowances |
nextPageKey | string | Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response |
tokenTransfers | array | The array of Token Transfer objects |
contractAddress | string | The token contract address |
contractDecimals | string | Token decimals specified in the contract |
contractName | string | The name of the token |
contractSymbols | string | The symbol of the token |
fromAddress | string | Address from which the transfer originated |
toAddress | array | Destination address for the transfer (multiple allowed) |
value | string | Token amount |
blockHash | string | The hash of the block |
blockNumber | integer | The block height |
blockTimestamp | string | The timestamp of the block |
transactionHash | string | The hash of the transaction |
transactionIndex | integer | The index of the transaction |
logIndex | integer | The 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.
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'