getWalletTokenTransfers

Get all incoming and outgoing ERC20 token transfers for the given wallet address in reverse chronological order (most recent first)

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

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

FieldTypeDescription

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!

GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletTokenTransfers?

Query Parameters

NameTypeDescription

walletAddress

String

0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee

contractAddress

String

0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7

{
    "walletAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
    "count": 100,
    "nextPageKey": "MzU3NTE4OTZhZmIxOjE3MDU5NDI3MDM6MTk4MDY3OjMzOA",
    "tokenTransfers": [
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
            "value": "209289408863958",
            "blockHash": "0x0644fde4cefb49f3ef572fb8267588cfbabb4f9396f6e5ea34dea49a2edd16df",
            "blockNumber": 511580,
            "blockTimestamp": "2024-01-20T08:38:40.000Z",
            "transactionHash": "0x07ffe05d7293ab6c265e047b9b26702e75ee8cbdd8f7e030ba87735bb31d9960"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x04d0390b777b424e43839cd1e744799f3de6c176c7e32c1812a41dbd9c19db6a",
            "value": "403971803965387",
            "blockHash": "0x0644fde4cefb49f3ef572fb8267588cfbabb4f9396f6e5ea34dea49a2edd16df",
            "blockNumber": 511580,
            "blockTimestamp": "2024-01-20T08:38:40.000Z",
            "transactionHash": "0x07ffe05d7293ab6c265e047b9b26702e75ee8cbdd8f7e030ba87735bb31d9960"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
            "value": "138026517144698",
            "blockHash": "0x06400db8d419d2680c394d314bf35264f6be2e3358c38ea5cca1c0918ddac353",
            "blockNumber": 490260,
            "blockTimestamp": "2024-01-01T06:49:58.000Z",
            "transactionHash": "0x02fc3485df39d423dd9f0e3a9fc0b8284f378c8fe50e01b88d41e5b66f2e57f6"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",
            "toAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "value": "21970424356422328",
            "blockHash": "0x06400db8d419d2680c394d314bf35264f6be2e3358c38ea5cca1c0918ddac353",
            "blockNumber": 490260,
            "blockTimestamp": "2024-01-01T06:49:58.000Z",
            "transactionHash": "0x02fc3485df39d423dd9f0e3a9fc0b8284f378c8fe50e01b88d41e5b66f2e57f6"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
            "value": "138751701225810",
            "blockHash": "0x040a4a3d7f9659386647711a7bb644cd54337ef9b4a3ca106ed0417d36682ffc",
            "blockNumber": 490258,
            "blockTimestamp": "2024-01-01T06:47:31.000Z",
            "transactionHash": "0x0355d102b3d27bf449cd90a8cf86bb5b66791533e011f0b4665465a7aaae3e93"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",
            "value": "22000000000000000",
            "blockHash": "0x040a4a3d7f9659386647711a7bb644cd54337ef9b4a3ca106ed0417d36682ffc",
            "blockNumber": 490258,
            "blockTimestamp": "2024-01-01T06:47:31.000Z",
            "transactionHash": "0x0355d102b3d27bf449cd90a8cf86bb5b66791533e011f0b4665465a7aaae3e93"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
            "value": "533619145413882",
            "blockHash": "0x07c87a49a288a84efdd00ddf76c33eb1f6078ce98f1865775fbd9286e8368a75",
            "blockNumber": 477124,
            "blockTimestamp": "2023-12-22T10:15:32.000Z",
            "transactionHash": "0x03dbb54565da66cef81269a8aac718897f6c027994e18481024606c81471bd8e"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",
            "toAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "value": "1985251493131367",
            "blockHash": "0x07c87a49a288a84efdd00ddf76c33eb1f6078ce98f1865775fbd9286e8368a75",
            "blockNumber": 477124,
            "blockTimestamp": "2023-12-22T10:15:32.000Z",
            "transactionHash": "0x03dbb54565da66cef81269a8aac718897f6c027994e18481024606c81471bd8e"
        },
        {
            "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "contractDecimals": "18",
            "contractName": "Ether",
            "contractSymbol": "ETH",
            "fromAddress": "0x069e5becf53bed3a73c3ebaaeb3deee49fd9fc1da31f9be3b3e34d761cd630ee",
            "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
            "value": "467846174146317",
            "blockHash": "0x0760cbe688f74b71fde53437151a575c542241883d6145097dcedd24f1d765b2",
            "blockNumber": 477119,
            "blockTimestamp": "2023-12-22T10:11:23.000Z",
            "transactionHash": "0x01eab9926c6c60b4a5f4921e1fe876322fe86e5c9b8e6da2199e53422f65e6b1"
        },
```

Curl request example

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

Last updated