eth_newPendingTransactionFilter
Optimism node API
eth_newPendingTransactionFilter | Optimism
Optimism API method that creates a filter in the node to notify when new pending transactions are received. Chainstack Optimism reference.
POST
eth_newPendingTransactionFilter
Optimism API method that creates a filter in the node to notify when new pending transactions are received. To check if the state has changed, call eth_getFilterChanges with the filter ID returned by this method.
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
none
Response
result— a string representing the filter ID. This ID should be used in subsequent calls to eth_getFilterChanges to retrieve new pending transactions.
Use case
Theeth_newPendingTransactionFilter method is useful for applications that need to monitor the mempool for new transactions. Common use cases include:
- Building transaction monitoring tools
- Creating real-time transaction tracking interfaces
- Implementing MEV (Maximal Extractable Value) strategies
- Monitoring specific addresses for pending transactions
eth_newPendingTransactionFilter — the mempool is private to the sequencer, so the filter returns no pending transactions, and the eth_subscribe("newPendingTransactions") subscription stays empty too. Optimism exposes Flashblocks through the pending block tag rather than WebSocket subscriptions, so poll eth_getBlockByNumber with the pending tag to track pre-confirmed transactions — see Track real-time transactions on Optimism with Flashblocks.
Note: After creating the filter, you need to poll eth_getFilterChanges periodically to get updates. Filters timeout if they’re not used for a period of time, so applications should be prepared to recreate them if necessary.Last modified on June 26, 2026