diff --git a/document/SUMMARY.md b/document/SUMMARY.md index 34936a9c..8ac09dd5 100644 --- a/document/SUMMARY.md +++ b/document/SUMMARY.md @@ -9,17 +9,17 @@ * [资产查询](assets.md) - * [订单](order.md) + * [订单](order_create.md) * [新订单](order_create.md) * [取消订单](order_cancel.md) * [历史订单](order_history.md) * [未成交订单](order_unfinshed.md) - * [行情](quote.md) + * [行情](quote_depth.md) * [委托深度](quote_depth.md) * [最新价格](quote_latest_price.md) * [成交记录](quote_trade_record.md) * [K线数据](quote_kline.md) - * [websocket](websocket.md) + * [websocket行情推送](websocket.md) diff --git a/document/websocket.md b/document/websocket.md new file mode 100644 index 00000000..9320babc --- /dev/null +++ b/document/websocket.md @@ -0,0 +1,29 @@ +#### Websocket 行情推送 + + - 订阅地址 ws://{haoquote_host}/quote/ws + - 用户可以侦听/订阅数个数据流 + +##### 订阅消息格式 +``` +{ + "sub": + [ + "depth.usdjpy", + "tradelog.usdjpy", + "latest_price.usdjpy", + "kline.m1.usdjpy", + "market.24h.usdjpy" + ] +} +``` + +##### 取消订阅消息格式 +``` +{ + "unsub": + [ + "tradelog.usdjpy", + "market.24h.usdjpy" + ] +} +``` \ No newline at end of file