WebSocket公有频道
主网
合约: wss://stream.deepcoin.com/streamlet/trade/public/swap?platform=api
现货: wss://stream.deepcoin.com/streamlet/trade/public/spot?platform=api
访问方式
# 发送心跳
request:
ping
response:
pong
请求参数
parameter | required | type | description | remark |
---|---|---|---|---|
Action | yes | string | 订阅操作 | 0:全部退订;1:订阅;2:退订; |
FilterValue | yes | string | 过滤值 | 格式:$ExchangeID_$InstrumentID_$Period Period 取值范围[1m:1 分钟;5m:5 分钟;15m:15 分钟;30m:30 分钟;1h:1 小时;4h:4 小时;12h:12 小时;1d:一天;1w:一个星期;1o:一个月;1y:一年;] |
LocalNo | yes | int | 本地唯一标识号 | 大于 0, 字符串比较, 自定义,一次会话中不能重复 |
ResumeNo | yes | int | 续传号 | 0:从头开始;-1:从服务端最新位置续传; |
TopicID | yes | string | 订阅主题标识 | 2:成交明细 |