Search
K
Links

Show fungible token history of a wallet

Overview

Fungible token transfers are critical in blockchain networks. They are used as a means of value exchange in cryptocurrency systems like Bitcoin and Ethereum. Beyond just transactions, they're also transferred into smart contracts in DeFi spaces for participation in liquidity pools or lending protocols. In Decentralised Autonomous Organisations (DAOs), governance tokens, a type of fungible token, are transferred to represent voting rights, enabling holders to have a say in network decisions. The versatility of fungible tokens and their transferability underscores the profound utility they bring to the blockchain ecosystem.

How to show the fungible token history of a specific wallet on the Ethereum network

Use the TatumSDK (@tatumio/tatum) to get a transaction history of the wallet.
TypeScript
JavaScript
curl
1
// yarn add @tatumio/tatum
2
import { TatumSDK, Network, Ethereum, ResponseDto, Transaction } from '@tatumio/tatum'
3
4
const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})
5
6
const txs: ResponseDto<Transaction[]> = await tatum.token.getAllFungibleTransactions({
7
addresses: ['0x78E851C35326c9296485E9720D85CB3Bd153b428'], // replace with your address
8
})
9
10
console.log(txs.data)
1
// Install with: npm install @tatumio/tatum
2
const { TatumSDK, Network } = require("@tatumio/tatum");
3
4
(async () => {
5
try {
6
const tatum = await TatumSDK.init({ network: Network.ETHEREUM });
7
const txs = await tatum.token.getAllFungibleTransactions({
8
addresses: ['0x78E851C35326c9296485E9720D85CB3Bd153b428'], // replace with your address
9
})
10
console.log(txs.data);
11
} catch (error) {
12
console.error("Error fetching wallet history:", error);
13
}
14
})();
1
curl --location --request GET 'https://api.tatum.io/v4/data/transactions?addresses=0x78E851C35326c9296485E9720D85CB3Bd153b428&chain=ethereum&transactionTypes=fungible'
Expected Response
[
{
"chain":"ethereum-mainnet",
"blockNumber":17463011,
"hash":"0x3509d471bf8362f4bffcfec8d27b0d1d6af3d3520dbd72f2aad61cfb8e22417f",
"transactionType":"fungible",
"transactionIndex":60,
"tokenAddress":"0xdac17f958d2ee523a2206206994597c13d831ec7",
"amount":"3900",
"timestamp":1686561155000,
"address":"0x78e851c35326c9296485e9720d85cb3bd153b428",
"counterAddress":"0x54157126f10ed5019ab2785cd8f1ced207d10346",
"transactionSubtype":"incoming"
}
]

Request interface

1
interface GetAllFungibleTransactionsQuery {
2
/**
3
* Token contract address
4
*/
5
tokenAddress?: string
6
/**
7
* Addresses to fetch. Up to 10 addresses as a comma separated string.
8
*/
9
addresses: string[]
10
/**
11
* Optional transaction type. If not specified, both incoming and outgoing transactions are returned.
12
*/
13
transactionTypes?: TransactionType[]
14
/**
15
* Optional from block. If not specified, all transactions are returned from the beginning of the blockchain.
16
*/
17
blockFrom?: number
18
/**
19
* Optional to block. If not specified, all transactions are returned up till now.
20
*/
21
blockTo?: number
22
/**
23
* Optional page size. If not specified, the default page size is used, which is 10.
24
*/
25
pageSize?: number
26
/**
27
* Optional page number. If not specified, the first page is returned.
28
*/
29
page?: number
30
}

Response interface

1
interface ResponseDto<T> {
2
/**
3
* Actual payload of the response
4
*/
5
data: T
6
/**
7
* Status of the response
8
*/
9
status: Status
10
/**
11
* In case of ERROR status, this field contains the error message and detailed description
12
*/
13
error?: ErrorWithMessage
14
}
15
16
interface Transaction {
17
/**
18
* Blockchain network
19
*/
20
chain: string
21
/**
22
* Block number
23
*/
24
blockNumber: number
25
/**
26
* Transaction hash
27
*/
28
hash: string
29
/**
30
* Transaction type
31
*/
32
transactionType: 'fungible' | 'nft' | 'multitoken' | 'native' | 'internal'
33
/**
34
* Transaction sub type
35
*/
36
transactionSubtype: 'incoming' | 'outgoing' | 'zero-transfer'
37
/**
38
* Index of the transaction in the block
39
*/
40
transactionIndex: number
41
/**
42
* Address of the token collection
43
*/
44
tokenAddress?: string
45
/**
46
* The ID of the token involved in the transaction (optional).
47
*/
48
tokenId?: string
49
/**
50
* Amount transferred. For outgoing transactions, it's a negative number. For zero-transfer transactions, it's always 0. For incoming transactions, it's a positive number.
51
*/
52
amount: string
53
/**
54
* Transaction timestamp - UTC millis
55
*/
56
timestamp: number
57
/**
58
* Address, on which transaction occurred. This is receiver address for incoming transactions and sender address for outgoing transactions.
59
*/
60
address: string
61
/**
62
* Counter address of the transaction. This is sender address for incoming transactions on `address` and receiver address for outgoing transactions on `address`.
63
*/
64
counterAddress?: string
65
}

Supported blockchain networks

Network
Support
Ethereum / Ethereum Sepolia / Ethereum Goerli BNB Smart Chain / BNB Smart Chain Testnet Celo / Celo Alfajores Polygon / Polygon Mumbai
Multiple addresses per 1 invocation
© Tatum Technology, LLC