getTokenTransfers

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

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.

Returns

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

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!

Returns all token transfers for a given ERC20 token contract address in reverse chronological orde

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

Query Parameters

{
  "contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
  "contractDecimals": "18",
  "contractName": "Ether",
  "contractSymbol": "ETH",
  "count": 100,
  "nextPageKey": "ZTYwZDg3YWJkNTIwOjE3MDU5NjI3MzY6NTE1MTEzOjIzMzpFdGhlcjpFVEg6MTg",
  "tokenTransfers": [
    {
      "fromAddress": "0x06486b80b103bb5bffb5909c2d029dfb1ed0ef320f545cca339b32d975c72452",
      "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
      "value": "54094989199810",
      "blockHash": "0x0221ea2421b883bff86b3112b70c84bdf41af9bb9f06667f675c4606d521787a",
      "blockNumber": 515113,
      "blockTimestamp": "2024-01-22T20:22:07.000Z",
      "transactionHash": "0x0589506564c8c42f89068562b07c38386b768ebf3c0504b7280e2eb38c429e65"
    },
    ... ...
    {
      "fromAddress": "0x07c80fe80a887454b96273c3d94971733adafa2a366bdeee7aa0bc83a41a3eaf",
      "toAddress": "0x01176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
      "value": "318206359223732",
      "blockHash": "0x038a72e058f754b4e8141b64cd03f3e6dc5196e04312e49c1457ec0c8df4bc7a",
      "blockNumber": 515111,
      "blockTimestamp": "2024-01-22T20:16:40.000Z",
      "transactionHash": "0x00aab6ba3b7358baea7f364be9f16a3bea2158917bc2b25a3149cedde7d3219f"
    }
  ]
}
curl --location 'https://starknet-mainnet.blastapi.io/<project-id>/builder/getTokenTransfers?contractAddress=0x013062189dc3dcc99e9Cee714c513033b8d99e3c&pageSize=1&fromBlock=188505&toBlock=18188504'

Last updated