> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thornode.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ThorEdge WebSocket methods

> Solana subscription methods over the ThorEdge WSS URL, the per-token subscription cap, and what a rejected subscribe looks like.

Connect a Solana WebSocket client to the complete `wss://` URL copied from the dashboard. The location token is the first path segment, exactly as in the HTTPS URL.

## Methods

Every method whose name ends in `Subscribe` or `Unsubscribe` is forwarded. Each has its own page with parameters, notification format, and a real exchange captured from ThorEdge. `blockSubscribe` and `voteSubscribe` are not enabled on the upstream node and return `-32601 Method not found`.

| Subscribe                                                                              | Unsubscribe                                                                                |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [`accountSubscribe`](/api-reference/thoredge-rpc/websocket/accountsubscribe)           | [`accountUnsubscribe`](/api-reference/thoredge-rpc/websocket/accountunsubscribe)           |
| [`blockSubscribe`](/api-reference/thoredge-rpc/websocket/blocksubscribe)               | [`blockUnsubscribe`](/api-reference/thoredge-rpc/websocket/blockunsubscribe)               |
| [`logsSubscribe`](/api-reference/thoredge-rpc/websocket/logssubscribe)                 | [`logsUnsubscribe`](/api-reference/thoredge-rpc/websocket/logsunsubscribe)                 |
| [`programSubscribe`](/api-reference/thoredge-rpc/websocket/programsubscribe)           | [`programUnsubscribe`](/api-reference/thoredge-rpc/websocket/programunsubscribe)           |
| [`rootSubscribe`](/api-reference/thoredge-rpc/websocket/rootsubscribe)                 | [`rootUnsubscribe`](/api-reference/thoredge-rpc/websocket/rootunsubscribe)                 |
| [`signatureSubscribe`](/api-reference/thoredge-rpc/websocket/signaturesubscribe)       | [`signatureUnsubscribe`](/api-reference/thoredge-rpc/websocket/signatureunsubscribe)       |
| [`slotSubscribe`](/api-reference/thoredge-rpc/websocket/slotsubscribe)                 | [`slotUnsubscribe`](/api-reference/thoredge-rpc/websocket/slotunsubscribe)                 |
| [`slotsUpdatesSubscribe`](/api-reference/thoredge-rpc/websocket/slotsupdatessubscribe) | [`slotsUpdatesUnsubscribe`](/api-reference/thoredge-rpc/websocket/slotsupdatesunsubscribe) |
| [`voteSubscribe`](/api-reference/thoredge-rpc/websocket/votesubscribe)                 | [`voteUnsubscribe`](/api-reference/thoredge-rpc/websocket/voteunsubscribe)                 |

## Example

Send after the socket opens:

```json theme={null}
{ "jsonrpc": "2.0", "id": 1, "method": "slotSubscribe" }
```

The first frame back is the subscription id, then one notification per slot:

```json theme={null}
{"jsonrpc":"2.0","result":3065,"id":1}
{"jsonrpc":"2.0","method":"slotNotification","params":{"result":{"slot":439745191,"parent":439745190,"root":439745159},"subscription":3065}}
```

## Authentication

| Outcome                                                             | HTTP status before upgrade | Body                                                                           |
| ------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------ |
| Token missing, malformed, unknown, revoked, or for another location | `401`                      | `{"jsonrpc":"2.0","error":{"code":-32001,"message":"unauthorized"},"id":null}` |
| Valid token from an IP outside its restriction                      | `403`                      | `{"jsonrpc":"2.0","error":{"code":-32002,"message":"forbidden"},"id":null}`    |
| Accepted                                                            | `101 Switching Protocols`  | —                                                                              |

Unlike HTTPS, a WebSocket connection is authenticated by the token only; the token must be present.

## Subscription cap

Active subscriptions are counted per location token across all of its connections, so the cap follows you through reconnects until the old subscriptions are unsubscribed or their connections close. Read the value under **Limits** in the dashboard.

A subscribe request over the cap is not forwarded. The client receives:

```json theme={null}
{"jsonrpc":"2.0","error":{"code":-32005,"message":"subscription limit exceeded"},"id":1}
```

Unsubscribing, or closing the connection, releases the slots.

## Connection behavior

* ThorEdge does not send keepalive pings and has no idle timeout of its own; ping and pong frames pass through in both directions.
* Request and notification frames are relayed unchanged. WebSocket traffic does not count against the RPS cap.
* After a reconnect, resubscribe and reconcile any state you missed through HTTPS.

## Next steps

* [HTTP methods](/api-reference/thoredge-rpc/http-methods)
* [Reconcile with FastGate account queries](/api-reference/fastgate/overview)
* [Read the subscription cap for your access](/dashboard/usage-and-limits)
