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
Endpoint Summary
The following REST calls can be used to get data for a wallet app: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