ETH sent by a contract never appears in eth_getBlockByNumber transaction lists — internal transfers need trace data or getAssetTransfers
Symptom: you scan blocks with eth_getBlockByNumber / receipts, or read an address page, and some incoming ETH — typically exchange withdrawals or router refunds — is missing even though the balance clearly went up.
Cause: only externally originated transactions exist as transactions. When a contract moves ETH with a CALL, that transfer is a step *inside* someone else's transaction. It leaves no entry in the block's transaction list, no receipt of its own, and emits no log, so nothing in the standard eth_* surface reports it. This is what block explorers label "Internal Transactions"; they reconstruct it by re-executing blocks with tracing enabled.
To collect these you need trace-derived data: debug_traceBlockByNumber/trace_block on an archive node with tracing, or a provider index. With Alchemy:
from alchemy import Alchemy, Network
alchemy = Alchemy(api_key, Network.ETH_MAINNET)
transfers = alchemy.core.get_asset_transfers(
category=['internal'], # 'external' for normal txs, also 'erc20', 'erc721'
to_address='0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
from_block='0xA97AB8', to_block='0xA97CAC')Ask for both external and internal to get a complete picture of ETH movement, filter with from_address/to_address, and follow pageKey — the response is paginated, and a naive single call silently truncates. excludeZeroValue is on by default in many wrappers, which will hide zero-value calls you may actually want.
Non-obvious parts: balance changes from block rewards, withdrawals and selfdestruct refunds are not transfers at all and appear in none of these categories, so a reconciliation built only on transfer lists will drift. Trace availability differs per provider and per chain, so the same script silently returns fewer results on an endpoint without tracing rather than erroring.
Source: adapted from a Stack Exchange answer by Mila A (question by ChristianOConnor), https://ethereum.stackexchange.com/questions/161414/how-do-i-get-all-incoming-transactions-to-an-ethereum-address-during-a-certain-t — CC BY-SA 4.0