getTokenTransfers

Get all token transfers for a given ERC20 token contract address in reverse chronological order (most recent first)

Parameters

  • contractAddress :(string) REQUIRED - The token contract address

  • fromBlock : (string) OPTIONAL - Starting block for the query

  • toBlock : (string) OPTIONAL - Ending block for the query

  • pageSize : (integer) OPTIONAL - Number of records to be retrieved on one page

  • pageKey : (string) OPTIONAL - Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response

Returns

  • contractAddress: <string> - The token contract address

  • contractDecimals : <string> - Token decimals specified in the contract

  • contractName: <string> - The name of the token

  • contractSymbols: <string> - The name of the token

  • count : <integer> - The number of transfers

  • nextPageKey: <string> - Key to get the next page of results, if more results 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 or the token transfer transaction

    • logIndex : <integer> - The index of the transaction log

Example Request and Result for getTokenTransfers

Request

curl --location 'https://eth-mainnet.blastapi.io/<project-id>/builder/getTokenTransfers?contractAddress=0x013062189dc3dcc99e9Cee714c513033b8d99e3c&pageSize=1&fromBlock=188505&toBlock=18188504'

Result

{
    "contractAddress": "0x013062189dc3dcc99e9cee714c513033b8d99e3c",
    "contractDecimals": "18",
    "contractName": "Bware",
    "contractSymbol": "INFRA",
    "count": 1,
    "nextPageKey": "MWNiOWMzZDJjMjkzOjE2OTg2NzU4NDk6MTgxODYxMzI6NDAwMDAxOTAwMDAwMDpCd2FyZTpJTkZSQToxOA",
    "tokenTransfers": [
        {
            "fromAddress": "0xd891830c826a8b0b2205ee9b6581d37a3efdf9af",
            "toAddress": "0x7e20e121ded9ed7c67b4971eed536e8f82873df3",
            "value": "753153937504918480988",
            "blockHash": "0x8c94a152fa30958f289803e783f0da34fba305ad4399ed5a3dada6a2e18dc40d",
            "blockNumber": 18186132,
            "blockTimestamp": "2023-09-21T18:47:59.000Z",
            "transactionHash": "0x4b3bd6e0c0694639162ae1c40a6745ea4308d33898f832e18ea069a6dccef036",
            "transactionIndex": 4,
            "logIndex": 19
        }
    ]
}

Last updated