Search
K
Links

Get all transactions on the wallet

This endpoint can help you get all the transactions of a wallet.
Try this feature
As the world of digital assets expands, it becomes increasingly important for users to keep track of their transactions across various blockchain networks. The ability to retrieve all transactions associated with a particular address is an essential feature for managing and auditing your digital assets. This guide will introduce you to obtaining all transactions for a specific address, providing you with a comprehensive overview of your transaction history. By leveraging this functionality, you can effectively monitor your digital asset activities, verify past transactions, and maintain accurate records for tax or accounting purposes, ultimately gaining greater control over your financial assets in the digital landscape.

How to get wallet transactions on the Ethereum network

Use the TatumSDK (@tatumio/tatum) to get a transaction history of the wallet.
TatumSDK wraps multiple different calls to the Tatum API together in 1 function, so curl example is not shown here. You can check the API documentation for specific operations, which are internally used inside the library.
TypeScript
JavaScript
1
// yarn add @tatumio/tatum
2
import {TatumSDK, Network, Ethereum, ResponseDto, AddressTransaction} from '@tatumio/tatum'
3
4
const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})
5
6
const txs: ResponseDto<AddressTransaction[]> = await tatum.address.getTransactions({
7
address: '0x514d547c8ac8ccbec29b5144810454bd7d3625ca', // replace with your address
8
})
9
10
console.log(txs.data)
11
12
// Expected outcome
13
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.address.getTransactions({
8
address: '0x514d547c8ac8ccbec29b5144810454bd7d3625ca', // replace with your address
9
});
10
console.log(txs.data);
11
} catch (error) {
12
console.error("Error fetching wallet balance:", error);
13
}
14
})();
15
16
// Expected outcome
17
// [{
18
// address: '0x514d547c8ac8ccbec29b5144810454bd7d3625ca',
19
// amount: '1',
20
// blockNumber: 3325299,
21
// chain: 'ethereum-sepolia',
22
// counterAddress: '0x39d2ba91296029afbe725436b4824ca803e27391',
23
// hash: '0xf4ef4715f9ba61f1fb606a32775a7bf281ddf7858092aeb3e0e0484d01957058',
24
// timestamp: 1681982316000,
25
// transactionIndex: 1,
26
// transactionSubtype: 'incoming',
27
// transactionType: 'native',
28
// }]
Expected Response
[
{
address: '0x514d547c8ac8ccbec29b5144810454bd7d3625ca',
amount: '1',
blockNumber: 3325299,
chain: 'ethereum-sepolia',
counterAddress: '0x39d2ba91296029afbe725436b4824ca803e27391',
hash: '0xf4ef4715f9ba61f1fb606a32775a7bf281ddf7858092aeb3e0e0484d01957058',
timestamp: 1681982316000,
transactionIndex: 1,
transactionSubtype: 'incoming',
transactionType: 'native',
}
]

How to get wallet transactions on the Bitcoin network

In order to get a transaction history of a Bitcoin address, you can use the same approach and reuse the same code.
TypeScript
JavaScript
1
// yarn add @tatumcom/js
2
import {TatumSDK, Network, Bitcoin, ResponseDto, AddressTransaction} from '@tatumio/tatum'
3
4
const tatum = await TatumSDK.init<Bitcoin>({network: Network.BITCOIN_TESTNET})
5
6
const balance: ResponseDto<AddressTransaction[]> = await tatum.address.getTransactions({
7
address: 'tb1qrd9jz8ksy3qqm400vt296udlvk89z96p443mv0', // replace with your address
8
})
9
10
console.log(balance.data)
11
12
/// Expected outcome
13
// [{
14
// address: 'tb1qrd9jz8ksy3qqm400vt296udlvk89z96p443mv0',
15
// amount: '0.001',
16
// blockNumber: 2427655,
17
// chain: 'bitcoin-testnet',
18
// hash: '954b246cdebf7338f561e2fdfb869fedd75302e2b233f339639b36d880e9c983',
19
// timestamp: 1680779879,
20
// transactionType: 'incoming',
21
// }]
1
// Install with: npm install @tatumcom/js
2
const { TatumSDK, Network } = require("@tatumio/tatum");
3
4
(async () => {
5
try {
6
const tatum = await TatumSDK.init({ network: Network.BITCOIN_TESTNET });
7
const txs = await tatum.address.getTransactions({
8
address: "tb1qrd9jz8ksy3qqm400vt296udlvk89z96p443mv0", // replace with your address
9
});
10
console.log(txs.data);
11
} catch (error) {
12
console.error("Error fetching wallet transactions:", error);
13
}
14
})();
15
16
// Expected outcome
17
// [{
18
// address: 'tb1qrd9jz8ksy3qqm400vt296udlvk89z96p443mv0',
19
// amount: '0.001',
20
// blockNumber: 2427655,
21
// chain: 'bitcoin-testnet',
22
// hash: '954b246cdebf7338f561e2fdfb869fedd75302e2b233f339639b36d880e9c983',
23
// timestamp: 1680779879,
24
// transactionType: 'incoming',
25
// }]
You can see, that the same request and response is used for different blockchain networks.

Request interface

1
interface GetAddressTransactionsQuery {
2
/**
3
* Blockchain address to get transactions for.
4
*/
5
address: string
6
/**
7
* Optional transaction type. If not specified, all transactions are returned. For networks that support only native transactions, this parameter is ignored.
8
*/
9
transactionTypes?: ['fungible' | 'nft' | 'multitoken' | 'native']
10
/**
11
* Optional transaction type. If not specified, both incoming and outgoing transactions are returned.
12
*/
13
transactionDirection?: 'incoming' | 'outgoing'
14
/**
15
* Optional from block. If not specified, all transactions are returned from the beginning of the blockchain.
16
*/
17
fromBlock?: number
18
/**
19
* Optional to block. If not specified, all transactions are returned up till now.
20
*/
21
toBlock?: 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 AddressTransaction {
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: 'incoming' | 'outgoing' | 'zero-transfer'
33
/**
34
* Index of the transaction in the block
35
*/
36
transactionIndex?: number
37
/**
38
* Address of the token collection, if the transaction is related to a token (ERC-20, ERC-721, ERC-1155)
39
*/
40
tokenAddress?: string
41
/**
42
* Token ID, if the transaction is related to a NFT (ERC-721) or MutiToken (ERC-1155)
43
*/
44
tokenId?: string
45
/**
46
* 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.
47
*/
48
amount: string
49
/**
50
* Transaction timestamp - UTC millis
51
*/
52
timestamp: number
53
/**
54
* Address, on which transaction occurred. This is receiver address for incoming transactions and sender address for outgoing transactions.
55
*/
56
address: string
57
/**
58
* Counter address of the transaction. This is sender address for incoming transactions on `address` and receiver address for outgoing transactions on `address`.
59
* Not all blockchain networks can identify the counter address (UTXO chains like Bitcoin e.g., where there is multiple senders or recipients). In this case, the counter address is not returned.
60
*/
61
counterAddress?: string
62
}

Supported blockchain networks

Network
Support
Ethereum / Ethereum Sepolia / Ethereum Goerli BNB Smart Chain / BNB Smart Chain Testnet Celo / Celo Alfajores Polygon / Polygon Mumbai
Native Assets ERC-20 Tokens (USDT, USDC,...) NFTs (BAYC,...) ERC-1155 Tokens
Bitcoin / Bitcoin Testnet Litecoin / Litecoin Testnet Dogecoin / Dogecoin Testnet
Native Assets only
© Tatum Technology, LLC