trace_filter
JSON-RPC method returns traces matching specified filter criteria. This method allows filtering traces by block range, addresses, and other criteria to find specific transaction patterns, making it essential for blockchain analysis, forensic investigations, and monitoring specific address activities.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
- Filter object (object, required): Criteria for filtering traces
Filter object structure
fromBlock
(string, optional): Starting block for the search (default: “earliest”)toBlock
(string, optional): Ending block for the search (default: “latest”)fromAddress
(array, optional): Array of addresses to filter by sendertoAddress
(array, optional): Array of addresses to filter by recipientcount
(integer, optional): Maximum number of traces to return
Response
The method returns an array of trace objects matching the specified filter criteria.Response structure
Trace objects:action
— Details about the call action (from, to, value, gas, input, callType)result
— Execution result (gasUsed, output)traceAddress
— Address path within the call hierarchytype
— Type of trace (call, create, suicide, etc.)blockNumber
— Block number containing the transactiontransactionHash
— Hash of the transaction
Usage example
Basic implementation
Example request
Shell
Use cases
Thetrace_filter
method is essential for applications that need to:
- Address monitoring: Monitor specific addresses for activity and transactions
- Forensic analysis: Investigate suspicious transactions and trace fund flows
- Compliance tracking: Track regulatory compliance and generate audit reports
- Analytics platforms: Build comprehensive blockchain analytics and reporting tools
- Security monitoring: Monitor for suspicious patterns and potential attacks
- DeFi analysis: Analyze DeFi protocol interactions and user behaviors
- MEV detection: Detect Maximum Extractable Value extraction patterns
- Arbitrage monitoring: Monitor arbitrage opportunities and execution patterns
- Protocol research: Research blockchain protocol usage and adoption patterns
- Risk assessment: Assess risks associated with specific addresses or contracts
- Regulatory reporting: Generate regulatory compliance reports and audits
- Trading analysis: Analyze trading patterns and market manipulation
- Wallet tracking: Track wallet activities across multiple transactions
- Contract usage analysis: Analyze how smart contracts are being used
- Network health monitoring: Monitor overall network health and activity patterns
- Academic research: Support academic blockchain research and analysis
Body
application/json