Showing wallet history with Blockscout REST API
This example uses REST methods with the PRO API. See the PRO API overview for information on creating and using an API key.
- Native token and ERC20/NFT balances
- All Transaction activity and status
- Human-readable method summaries
Method Summary
The following REST methods can be used to spin up a wallet-like app:| Load data | Method | Purpose |
|---|---|---|
| 1. Wallet overview | GET /{chainid}/api/v2/addresses/{address} | Get wallet metadata and native balance for the header or overview |
| 2. Wallet transactions | GET /{chainid}/api/v2/addresses/{address}/transactions | Get the main wallet activity feed |
| 3. Token transfers | GET /{chainid}/api/v2/addresses/{address}/token-transfers | Show ERC-20 / NFT movement alongside native transfers |
| 4. Human-readable summaries | GET /{chainid}/api/v2/transactions/{hash}/summary | Display raw transactions in human-readable format |
1. Load wallet overview
- native balance
- ENS / tags / address metadata
- wallet header
2. Load wallet transactions
- wallet activity list
- transaction status
- value, timestamp, method, counterparty
3. Load token transfers
- ERC-20 transfers
- NFT transfers
- token activity tabs or merged activity feeds
4. Load human-readable summaries
transfermulticallexecute
- “Sent 12.5 USDC”
- “Swapped ETH for USDT”
- “Approved USDC spending”
Pagination
REST responses use keyset pagination. When a response includesnext_page_params, copy that object and append its fields to the next request.
Example:
next_page_params from that response.
TypeScript example
This example:- fetches wallet transactions
- fetches a summary for each transaction
- prints a human-readable activity list