Calculate my taxes — fetching full history with Blockscout PRO API
This example uses REST methods with the PRO API. See the PRO API overview for information on creating and using an API key.
- get supported chains
- resolve → filter mainnets
- fetch 1-year history per chain
- merge + dedupe
- output rows
Endpoint Summary
The following REST calls can be used to get tax data. Note thatapi/v2 calls require a working PRO API key.
| Handle | Why |
|---|---|
GET /api/json/config | Get all supported chain IDs |
GET https://chains.blockscout.com/api/chains?chain_ids=... | Resolve + filter mainnets |
GET /{chainid}/api/v2/addresses/{address}/transactions | Top-level txs (fees + native transfers) |
GET /{chainid}/api/v2/addresses/{address}/internal-transactions | Native value inside contract execution |
GET /{chainid}/api/v2/addresses/{address}/token-transfers | ERC20 / NFT movements |
Pull and Combine 3 feeds
Transactions- join by tx hash
- deduplicate
- normalize
Pagination
REST responses use keyset pagination. When a response includesnext_page_params, copy that object and append its fields to the next request.
Example (params may include additional items such as value, hash, and date inserted that you won’t use):
next_page_params from that response until empty