getTokenTransfers
Efficiently access and retrieve all token transfers for a specified ERC20 token contract address, ordered in reverse chronological order (most recent transfers first), using the getTokenTransfers
method. This documentation page provides valuable insights into how to utilize this method, allowing developers to seamlessly access and analyze token transfer data within their applications or projects.
How to use getTokenMetadata method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getTokenApprovals Builder API method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.\
Parameter | Type | Description |
---|---|---|
contractAddress * | string | The token contract address. |
fromBlock | string | Starting block for the query. |
toBlock | string | Ending block for the query. |
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
Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.
Parameter | Type | Description |
---|---|---|
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. |
count | integer | The number of transfers. |
nextPageKey | string | Key to get the next page of results if more are available. |
tokenTransfers | array | The array of Token Transfers for the specified token contract. |
fromAddress | string | The wallet address from which tokens were transferred. |
toAddress | string | Destination wallet address. |
value | string | The amount of tokens to be transferred. |
blockHash | string | The hash of the block in which the transfer transaction was executed. |
blockNumber | integer | The height of the block in which the transfer transaction was executed. |
blockTimestamp | string | The timestamp of the block in which the transfer transaction was executed. |
transactionHash | string | The hash of the token transfer transaction. |
transactionIndex | integer | The number of the token transfer transaction. |
logIndex | integer | The index of the transaction log. |
Example Request and Result for getTokenTransfers
In this section, we provide an illustrative example of a request made to retrieve token transfers for a specific ERC20 token contract address using the getTokenTransfers
method. The example request demonstrates how to specify the contract address, fromBlock, toBlock, pageSize, and pageKey parameters to customize your query.
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 --location 'https://starknet-mainnet.blastapi.io/<project-id>/builder/getTokenTransfers?contractAddress=0x013062189dc3dcc99e9Cee714c513033b8d99e3c&pageSize=1&fromBlock=188505&toBlock=18188504'