# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

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

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'eth_uninstallFilter', params: ['0x01']})
};

fetch('https://pharos-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://pharos-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_uninstallFilter",
    "params": ["0x01"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://pharos-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_uninstallFilter\",\n  \"params\": [\n    \"0x01\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://pharos-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_uninstallFilter\",\n  \"params\": [\n    \"0x01\"\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://pharos-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_uninstallFilter\",\n  \"params\": [\n    \"0x01\"\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: eth_uninstallFilter
description: Uninstalls a filter with the given ID.
params:
  - name: Filter identifier
    required: true
    description: The ID of the filter to uninstall.
    schema:
      title: hex encoded unsigned integer
      type: string
      pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
result:
  name: Success
  description: true if the filter was successfully uninstalled, `false` otherwise.
  schema:
    type: boolean
examples:
  - name: eth_uninstallFilter example
    params:
      - name: Filter identifier
        value: '0x01'
    result:
      name: Success
      value: true
```
