---
id: "P:cAlgo.API.WebSocketClientOptions.SubProtocols"
kind: "property"
type: "T:cAlgo.API.WebSocketClientOptions"
url: "https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/SubProtocols/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# WebSocketClientOptions.SubProtocols

Member of [WebSocketClientOptions](https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/index.md).

## SubProtocols

Gets or sets sub-protocols to be negotiated during the WebSocket connection handshake.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public IEnumerable<string> SubProtocols {get; set;}
```

Python:

```python
webSocketClientOptions.SubProtocols: Iterable[str]
```

### Returns

`IEnumerable<string>` — 

### Examples

C#:

```csharp
var options = new WebSocketClientOptions { SubProtocols = new[] { "json", "v2.quotes" } };
var client = new WebSocketClient(options);
client.Connect(new Uri("wss://stream.example.com/quotes"));
```

Python:

```python
from System import Uri, Array, String

options = WebSocketClientOptions()
options.SubProtocols = Array[String](["json", "v2.quotes"])
client = WebSocketClient(options)
client.Connect(Uri("wss://stream.example.com/quotes"))
```

