Skip to main content

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.\

ParameterTypeDescription
contractAddress *stringThe token contract address.
fromBlockstringStarting block for the query.
toBlockstringEnding block for the query.
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

Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.

ParameterTypeDescription
contractAddressstringThe token contract address.
contractDecimalsstringToken decimals specified in the contract.
contractNamestringThe name of the token.
contractSymbolsstringThe symbol of the token.
countintegerThe number of transfers.
nextPageKeystringKey to get the next page of results if more are available.
tokenTransfersarrayThe array of Token Transfers for the specified token contract.
fromAddressstringThe wallet address from which tokens were transferred.
toAddressstringDestination wallet address.
valuestringThe amount of tokens to be transferred.
blockHashstringThe hash of the block in which the transfer transaction was executed.
blockNumberintegerThe height of the block in which the transfer transaction was executed.
blockTimestampstringThe timestamp of the block in which the transfer transaction was executed.
transactionHashstringThe hash of the token transfer transaction.
transactionIndexintegerThe number of the token transfer transaction.
logIndexintegerThe 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.

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 --location 'https://starknet-mainnet.blastapi.io/<project-id>/builder/getTokenTransfers?contractAddress=0x013062189dc3dcc99e9Cee714c513033b8d99e3c&pageSize=1&fromBlock=188505&toBlock=18188504'