---
title: "eth_unsubscribe"
description: "Unsubscribe from a previously created subscription (Base Sepolia)"
url: "https://blockreq.com/docs/build/api-reference/base-sepolia/eth_unsubscribe/"
---

# eth_unsubscribe

**Network:** Base Sepolia · Testnet · Chain ID `84532` (`0x14a34`)

**Counts as 1 request.** See [Request Counting](https://blockreq.com/docs/pricing/request-counting/index.md).

> **Protocol**: WebSocket (WSS) only

## Description

Unsubscribe from a previously created subscription.

## Parameters

| Parameter        | Type  | Required | Description     |
| ---------------- | ----- | -------- | --------------- |
| `subscriptionId` | `hex` | Yes      | Subscription ID |

## Request

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

## Code Examples

**TypeScript**

```typescript
const ws = new WebSocket("wss://base-sepolia-rpc.blockreq.com/v1/rpc/public");

ws.onopen = () => {
  ws.send(JSON.stringify({
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x1"
  ],
  "id": 1
}));
};
ws.onmessage = (event) => {
  console.log(JSON.parse(event.data));
};
```

**Python**

```python
import asyncio
import json

import websockets

async def main():
    async with websockets.connect("wss://base-sepolia-rpc.blockreq.com/v1/rpc/public") as ws:
        await ws.send('{"jsonrpc":"2.0","method":"eth_unsubscribe","params":["0x1"],"id":1}')
        async for message in ws:
            print(json.loads(message))

asyncio.run(main())
```
