# WebSocket Transaction Subscriptions

> Subscribe to real-time transaction logs and signature confirmations via WebSocket.

Canonical: https://nolimitnodes.com/docs/api-reference/websocket/transactions

## logsSubscribe

**WebSocket** - JSON-RPC

Subscribe to transaction logging to receive notifications with log output.

### Parameters

### `params[0]`, string | object, required

Filter - one of:
  - `"all"` - all transactions except vote transactions
  - `"allWithVotes"` - all transactions including vote transactions
  - `{ "mentions": [""] }` - transactions mentioning an address

### `params[1]`, object

Configuration object:
  - `commitment` (string) - commitment level

### Request

```bash wscat
wscat -c wss://ws.nln.clr3.org -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"logsSubscribe","params":[{"mentions":["11111111111111111111111111111111"]},{"commitment":"finalized"}]}
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "logsSubscribe",
  "params": [
    {
      "mentions": ["11111111111111111111111111111111"]
    },
    {
      "commitment": "finalized"
    }
  ]
}
```

### Response

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

### Notification Format

### `result.value`, object

### properties

Transaction signature.

    ### `err`, object

Error if transaction failed (null on success).

    ### `logs`, array

Array of log messages output during execution.

***

## logsUnsubscribe

**WebSocket** - JSON-RPC

Cancel transaction logging notifications.

### `params[0]`, integer, required

Subscription ID returned by `logsSubscribe`.

```bash wscat
wscat -c wss://ws.nln.clr3.org -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"logsUnsubscribe","params":[0]}
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "logsUnsubscribe",
  "params": [0]
}
```

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

***

## signatureSubscribe

**WebSocket** - JSON-RPC

Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level. The subscription is automatically cancelled after the notification is delivered.

### Parameters

### `params[0]`, string, required

Transaction signature, base-58 encoded.

### `params[1]`, object

Configuration object:
  - `commitment` (string) - commitment level (default: `finalized`)
  - `enableReceivedNotification` (boolean) - receive notification when the transaction is received by the node

### Request

```bash wscat
wscat -c wss://ws.nln.clr3.org -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"signatureSubscribe","params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",{"commitment":"finalized","enableReceivedNotification":false}]}
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "signatureSubscribe",
  "params": [
    "2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",
    {
      "commitment": "finalized",
      "enableReceivedNotification": false
    }
  ]
}
```

### Response

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

### Notification Format

### `result.value`, object

### properties

Error if transaction failed (null on success).

> Note: The subscription is automatically removed once the notification is sent. No need to call `signatureUnsubscribe`.

***

## signatureUnsubscribe

**WebSocket** - JSON-RPC

Cancel signature confirmation notifications (if needed before delivery).

### `params[0]`, integer, required

Subscription ID returned by `signatureSubscribe`.

```bash wscat
wscat -c wss://ws.nln.clr3.org -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"signatureUnsubscribe","params":[0]}
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "signatureUnsubscribe",
  "params": [0]
}
```

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