# 订阅交易推送

`WS` `request · cmd 16`

订阅交易网关主题。主题 `private` 推送订单/成交通知。响应返回成功/失败/当前订阅主题。

```protobuf
message Sub {
  repeated string topics = 1;
}

message SubResponse {
  repeated string success = 1;
  repeated Fail fail = 2;
  repeated string current = 3;
}
```

## Request Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `topics` | string[] | No | 要订阅的 topic |

## Response Fields

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | string[] | No | 订阅成功 |
| `fail` | object[] | No | 订阅失败 |
| `└ topic` | string | No | 主题 |
| `└ reason` | string | No | 失败原因 |
| `current` | string[] | No | 当前订阅 |

## Response JSON Example

```json
{
  "success": [
    "private"
  ],
  "fail": [],
  "current": [
    "private"
  ]
}
```
