> ## Documentation Index
> Fetch the complete documentation index at: https://chainstack-docs-polygon-erigon-trace-deprecation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_newPendingTransactionFilter | Optimism

> Optimism API method that creates a filter in the node to notify when new pending transactions are received. Chainstack Optimism reference.

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.

<Warning>
  On Optimism, this method returns an empty array — the mempool is [private to the sequencer](/docs/mempool-configuration), so there are no public pending transactions to surface. For real-time pre-confirmed transactions, poll the `pending` block tag (Flashblocks) instead — see [Track real-time transactions on Optimism with Flashblocks](/docs/optimism-streaming-transactions-flashblocks).
</Warning>

## 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

The `eth_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

On Optimism, these patterns are not served by `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](/docs/optimism-streaming-transactions-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.


## OpenAPI

````yaml openapi/optimism_node_api/eth_newPendingTransactionFilter.json POST /efb0a5eccd2caa5135eb54eba6f7f300
openapi: 3.0.0
info:
  title: eth_newPendingTransactionFilter example
  version: 1.0.0
  description: >-
    This is an API example for eth_newPendingTransactionFilter, a method to
    create a new filter object that notifies when new pending transactions enter
    the transaction pool.
servers:
  - url: https://optimism-mainnet.core.chainstack.com
security: []
paths:
  /efb0a5eccd2caa5135eb54eba6f7f300:
    post:
      tags:
        - Ethereum Operations
      summary: eth_newPendingTransactionFilter
      operationId: newPendingTransactionFilter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_newPendingTransactionFilter
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The ID of the created pending transaction filter
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````