Transfers API
Get Token Transfers

Get Token Transfers

Overview

The Get Token Transfers endpoint obtains data on all interactions with a specific token by providing its contract as a required path parameter. The range should be defined by either block_number, timestamp, or block_hash. To get all transfers of a particular token from an EOA wallet, specify its address as origin. Narrow your search by asset_type if needed.

📘️

Multiple values can be set for the contract and asset_type parameters, with a maximum of five items each.

Usage

In this example, we receive all MATIC transfers by its contract 0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0 on Ethereum Mainnet.

import * as Parsiq from '@parsiq/parsiq.js';
import {AssetType} from "@parsiq/parsiq.js/dist/enum/asset-type.js";
 
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
 
const transfers = client.transfers.token.getByBlockRange(`0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0`, 1, 'latest', {
    asset_type: [AssetType.FungibleToken]
});
 
for await (const transfer of transfers) {
    console.log(transfer);
}

Output:

{
  id: '000000000074c972-000e-00000001',
  tx_hash: '0xe87a9e02393b3c896339e8e1bb8d37ad97b3b8f71bc7fd996136b818404dbbb2',
  block_hash: '0x9530410f6d9dfea73881aeb7c622cdcb9a8d911f66f1c667fb3d92b51a1636f7',
  block_number: 7653746,
  timestamp: 1556425192,
  origin: '0x564286362092d8e7936f0549571a803b203aaced',
  contract: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
  sender: '0x564286362092d8e7936f0549571a803b203aaced',
  recipient: '0x226801f9ca5fa1332cbe233b420462debefcb6c7',
  value: '59840000000000000000000',
  token_id: null,
  asset_type: 'ft'
}

Parameters

Path params
chainId
string
REQUIRED
version
string
REQUIRED
contract
string
array of strings
REQUIRED
Query params
block_number_start
string
number
REQUIRED
block_number_end
string
number
REQUIRED
asset_type
string
array of strings
origin
string
offset
string
limit
number
estimate_cu
boolean