Inspect Account Transactions

This guide helps obtaining and inspecting account transactions across different chains

Use this guide to see how to view a list of transactions executed by a given account. You can filter by chain, date, or other parameters. Refer to the API specification for the underlying API details.


Retrieve Transactions via cURL

Use the following cURL command to fetch account transactions:

curl --request GET "https://svc.blockdaemon.com/defi/v1/transactions?chainID=eip155:1&accountAddress=0xf271AAFC62634e6Dc9A276ac0f6145C4fDbE2Ced&limit=10" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" | jq

Required parameters

ParameterDescription
chainIDCAIP-2 chain identifier (e.g., eip155:1 for Ethereum)
accountAddressAccount address to query transactions for
limitMaximum number of transactions to return (default 100)

Optional parameters

ParameterDescription
fromBlockStart block number
toBlockEnd block number or "latest"

The response includes

  • Transaction metadata (hash, block number, timestamp)
  • Token transfers with amounts and USD values
  • Gas costs and transaction status
  • Explorer and Tenderly links
  • Next page token for pagination

Example response

{
	"items": [
		{
			"txHash": "0xb15ba629e9693655b683e13becbf8269c41030e24c3be301133b5cf37422a9e5",
			"blockNumber": 21421994,
			"chainID": "eip155:1",
			"timestamp": "2024-12-17T11:35:35Z",
			"status": "Confirmed",
			"transfers": [
				{
					"type": "Native",
					"tokenAmount": {
						"amount": "10000000000000000",
						"amountUSD": 30.1888,
						"token": {
							"symbol": "ETH",
							"name": "Ether",
							"decimals": 18
						}
					}
				}
			]
		}
	],
	"nextPage": "0xb15ba629e9693655b683e13becbf8269c41030e24c3be301133b5cf37422a9e5-21421994"
}

Retrieve Transactions Programmatically

Use the following TypeScript example to query transactions via the API: npm exec src/main/scripts/get-transactions. A simplified snippet is here:

const transactionsApi = new TransactionsApi(apiConfig);

const transactionsRequest: GetTransactionsRequest = {
      accountAddress: "0xf271AAFC62634e6Dc9A276ac0f6145C4fDbE2Ced",
      chainID: "eip155:1",
      10, //limit
      0, // page
    };

try {
	const transactions = await transactionsApi.getTransactions(request);
	console.log("Transactions:", JSON.stringify(transactions, null, 2));
	return transactions;
} catch (error) {
	console.error("Failed to fetch transactions:", error);
	throw error;
}

Paginating Through Results

For accounts with many transactions, results are paginated. Use the nextPage token from the response to fetch subsequent pages:

let nextPage = "";
do {
	const request: GetTransactionsRequest = {
		chainID: "eip155:1",
		accountAddress: process.env.SENDER_ADDRESS,
		nextPage
	};
	
	const response = await transactionsApi.getTransactions(request);
	console.log(`Page transactions: ${response.items.length}`);
	
	nextPage = response.nextPage;
} while (nextPage);

At this point, you have learned how to:

✅ Manage approvals
✅ View token balances
✅ Retrieve transaction history
✅ Obtain blockchain metadata

Combining these features lets you track assets across multiple chains, manage risk, detect anomalies early, and optimize your DeFi portfolio. This ensures you can monitor value, manage risk, detect anomalies early, and optimize cross-chain activities.

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.