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

# JSON-RPCoverWebSockets

## Authentication + Subscribe & Unsubscribe to Notification Channels

1. Authenticate, establish a heartbeat and Subscribe to the `rfq`, `quote_status`, `quote_book`, `quote`, `order`, `trade`, and `trade_tape` *JSON-RPCoverWebSockets* Notification Channels.

## Message Sequence Numbers

WebSocket messages contain sequence numbers to help clients identify if they have missed any messages during temporary disconnections or network errors. The sequence number is included in the WebSocket messages under the `meta` field.

### Message Structure with Sequence Numbers

WebSocket messages now include an additional `meta` field that contains the following properties:

| Member    | Type   | Description                                     |
| --------- | ------ | ----------------------------------------------- |
| seq_group | number | Unique identifier for the group of messages     |
| seq_num   | number | Sequence number of the message within the group |

Here's an example of a WebSocket message with sequence numbers:

```json
{
  "jsonrpc": "2.0",
  "method": "subscription",
  "params": {
    "channel": "rfq",
    "data": {
    },
    "meta": {
      "seq_group": 1692463499,
      "seq_num": 1027
    }
  }
}
```

### Handling Sequence Numbers

Clients should monitor the sequence numbers of the incoming messages to ensure they have not missed any messages. If a client detects a gap in the sequence numbers, it may have missed one or more messages and should take appropriate action, such as refreshing data from REST.

Sequences increase monotonically within the context of a sequence group. Sequences are only relevant within a sequence group, which represents a subscribed channel. Sequences may be re-used between sequence groups.

While messages are sent ordered according to their sequences, sequences are not guaranteed not to repeat.