# Subscribe

Before you can send messages to a particular WebSocket channel, you must first subscribe to it.

Some of the market data websocket channels take an `instrument_codes` property alongside the name of the channel.


:::info[Note]
You can only subscribe to **one** channel in a single `SUBSCRIBE` message.
:::

### Subscription Request

```json
{
    "type": "SUBSCRIBE",
    "channels": [
      {
        "name": "TRADING"
      }
    ]
}
```

<DataSchema id="406387" />

### Subscription Response

#### Success
```json
{
    "type": "SUBSCRIPTIONS",
    "channels": [
        {
            "name": "TRADING"
        }
    ],
    "time": 1731671164898119453
}
```

<DataSchema id="406388" />

#### Error

```json
{
    "error": "Invalid channel."
}
```

<DataSchema id="406389" />