trace_filter
Returns traces matching the specified filter. The response is limited to 10000 traces per response. This method uses 300 credits from your daily balance.
Parameters
filter object
[Required] with the following keys and their values:fromBlock
: [optional] Trace starts at this block.toBlock
: [optional] Trace stops at this block.fromAddress
: [optional] Include only traces sent from this address.toAddress
: [optional] Include only traces with this destination address.after
: [optional] The offset trace number.count
: [optional] Number of traces to display in a batch.
Returns
A trace
list that matches the supplied filter.
Example
Replace <YOUR-API-KEY>
with an API key from your MetaMask Developer dashboard.
Request
- curl
- WSS
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "trace_filter", "params": [{"fromBlock": "0x1", "toBlock": "0x21", "after": 2, "count": 2, "fromAddress": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}], "id": 415}'
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "trace_filter", "params": [{"fromBlock": "0x1", "toBlock": "0x21", "after": 2, "count": 2, "fromAddress": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}], "id": 415}'