> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.whalehunt.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.whalehunt.net/_mcp/server.

# Changing a filter

Resume restores a previous subscription. Rebind explicitly creates a new filter generation. Sending a changed filter with an old token in ordinary `subscribe` causes a binding mismatch.

## Safe sequence

1. Finish old processing through a locally committed checkpoint.
2. Send `rebind` with the active subscription ID and `expectedGeneration`, a new filter and explicit start mode.
3. Wait for the new `subscribed`; save its generation, hash and frozen mappings.
4. Process its cut through batches, checkpoints and `caught_up`.
5. ACK only with the new generation.

This complete template uses a synthetic condition and placeholder token. Substitute a known permitted condition and a checkpoint from the real current session.

```json
{
  "version": 1,
  "kind": "rebind",
  "requestId": "request-3",
  "subscriptionId": "market-1",
  "expectedGeneration": "1",
  "filters": {
    "conditionIds": ["0x1111111111111111111111111111111111111111111111111111111111111111"],
    "stages": ["included", "canonicality"]
  },
  "start": {"mode": "resume", "token": "REPLACE_WITH_CURRENT_CHECKPOINT"}
}
```

## History and permissions

The new predicate does not reinterpret the old cursor. Resume scans after the selected old checkpoint using the new filter; it does not request all earlier history for the new market. Old-generation ACKs are invalid after rebind.

Rebind does not expand the current lease's scopes or reservation. A wider scope can require a new connection and authentication. Do not bypass a refusal by multiplying keys or subscription IDs.

If rebind is rejected, do not assume the new generation exists. Recover the agreed state using [recovery](/polymarket/stream/recovery). See [frames](/polymarket/reference/frames) for exact fields.