> For the complete documentation index, see [llms.txt](https://docs.rpcfast.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rpcfast.com/rpc-fast-saas-evm/ethereum-api/eth_newfilter-ethereum.md).

# eth\_newFilter - Ethereum

eth\_newFilter on Ethereum: creates a log filter on the node. Poll it with \`eth\_getFilterChanges\` to receive new matching logs. Parameters, response and request example for the RPC Fast endpoint.

Creates a log filter on the node. Poll it with `eth_getFilterChanges` to receive new matching logs.

{% hint style="info" %}
Filters expire after about 5 minutes without polling.
{% endhint %}

## Parameters

1. `filter` (object) — Log filter
   * `fromBlock` (string) — Optional. First block, block number as hex, or a tag: `latest`, `earliest`, `pending`, `safe`, `finalized`
   * `toBlock` (string) — Optional. Last block, same format as `fromBlock`
   * `address` (address | array) — Optional. Contract address or list of addresses
   * `topics` (array) — Optional. Topic filters by position; `null` matches anything, a nested array matches any of its values

## Returns

Filter ID.

## Example

#### Request

```bash
curl https://eth-mainnet.rpcfast.com/?api_key=<API_KEY> \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_newFilter","params":[{"fromBlock":"latest","address":"0xdac17f238db9863dae526eb0dc935e7cf9fcec54"}]}'
```

#### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x7ce5b033db1df8158ff926514726c339"
}
```

See [Compute Units](https://docs.rpcfast.com/rpc-fast-saas-evm/compute-units-cus.md) for the price of this method on Ethereum.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rpcfast.com/rpc-fast-saas-evm/ethereum-api/eth_newfilter-ethereum.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
