取消订阅#
取消一个或者多个频道。
请求参数#
Parameter | Type | Required | Description |
---|---|---|---|
op | String | 是 | 操作, unsubscribe |
args | Array | 是 | 取消订阅的频道列表 |
> channel | String | 是 | 频道名 |
> chainIndex | String | 是 | 链的唯一标识。 (如1代表Ethereum。更多可查看这里。) |
> tokenContractAddress | String | 是 | 币种合约地址 |
响应参数#
Parameter | Type | Description |
---|---|---|
event | String | 操作,unsubscribe 或者 error |
code | String | 错误码 |
msg | String | 错误消息 |
connId | String | WebSocket连接ID |
请求格式说明
{"op": "unsubscribe","args": ["< SubscriptionTopic> "]}
请求示例#
shell
{
"op": "login",
"args": [{
"apiKey": "985d5b66-57ce-40fb-b714-afc0b9787083",
"passphrase": "123456",
"timestamp": "1538054050",
"sign": "7L+zFQ+CEgGu5rzCj4+BdV2/uUHGqddA9pI6ztsRRPs="
}]
}
响应示例#
200
{
"event": "unsubscribe",
"arg": {
"channel": "price",
"chainIndex": "1",
"tokenContractAddress": "0x382bb369d343125bfb2117af9c149795c6c65c50"
},
"connId": "d0b44253"
}