Method not found: eth_newFilter

Tatum RPC nodes don't support eth_newFilter; poll eth_getLogs, subscribe to logs over WebSocket, or use Tatum Notifications to watch contract events.

Method not found: eth_newFilter means the Tatum RPC endpoint doesn't support filter methods. This is expected behavior: Tatum does not support eth_newFilter and has no plans to enable it. To watch contract events, poll eth_getLogs, subscribe to logs with eth_subscribe over WebSocket, or get webhooks from Tatum Notifications.

Symptom

When calling eth_newFilter on a Tatum RPC endpoint, you receive the following error:

{
  "id": 1,
  "jsonrpc": "2.0",
  "error": {
    "code": -32601,
    "message": "Method not found: eth_newFilter"
  }
}

The code is -32601, the JSON-RPC code for a method that doesn't exist, or -16405, which Gateway error codes list for a method that isn't supported or enabled. Other filter methods, such as eth_newBlockFilter and eth_getFilterChanges, return the same error.

You can also hit it without calling the method yourself: with ethers v6, event listeners such as contract.on(...) on a JsonRpcProvider call eth_newFilter by default.

Cause

Tatum doesn't support filters, for two reasons:

  • Stateful by design: eth_newFilter creates a filter on a node and returns its ID, and the client then polls it with eth_getFilterChanges. Nodes must keep state for every client filter, which makes it difficult to scale securely on multi-tenant infrastructure. Tatum routes requests across multiple nodes, so the node that answers a poll may not know the filter.
  • Abuse risk: Filters can be created and left unpolled, and each one holds node resources until it expires. This makes filters a vector for abuse and degrades service for others.

Solution

Instead of eth_newFilter, use one of these:

  1. Poll eth_getLogs. Query logs directly for any block range or contract. Store the last block you processed, then request the logs from the next block onward. Keep the range within your plan's limit: 100 blocks on the Anonymous plan and 10,000 on paid and Free plans (see Limits and method availability). For example, to get 0xdAC17F958D2ee523a2206206994597C13D831ec7 Transfer events:

    curl 'https://ethereum-mainnet.gateway.tatum.io' \
      --header 'content-type: application/json' \
      --header 'x-api-key: {YOUR_API_KEY}' \
      --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"{FROM_BLOCK}","toBlock":"latest"}],"id":1}'

    Replace {FROM_BLOCK} with a hex block number, such as the last block you processed plus 1.

  2. Subscribe over WebSocket. For pushed events instead of polling, connect to wss://ethereum-mainnet.gateway.tatum.io/{YOUR_API_KEY} and send eth_subscribe with the same filter. Subscriptions need a WebSocket connection; they don't work over HTTP. For a full example, see Ethereum WebSocket.

    {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["logs",{"address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}
  3. Switch ethers v6 to polling. Create the provider with polling: true, so event listeners use eth_getLogs instead of eth_newFilter:

    import { FetchRequest, JsonRpcProvider } from "ethers";
    
    const request = new FetchRequest("https://ethereum-mainnet.gateway.tatum.io");
    request.setHeader("x-api-key", "{YOUR_API_KEY}");
    
    const provider = new JsonRpcProvider(request, undefined, { polling: true });
  4. Use Tatum Notifications. Notifications send webhook callbacks for blockchain events, such as transactions and smart contract events, so you don't run a listener at all.

FAQ

Does eth_subscribe work over HTTP?

No. Subscriptions need a connection that stays open in both directions, so eth_subscribe works only on the WebSocket endpoint (wss://). Over HTTP, poll eth_getLogs.

How do I get new blocks without eth_newBlockFilter?

Poll eth_blockNumber, or subscribe to newHeads with eth_subscribe over WebSocket.

Still stuck?

Report an issue to support with the request you send, the full response and its x-request-id.


Did this page help you?