Commit 1a9b5d1b by ken

depth

parent c5ee1a2a
const stream = 'wss://api.zb.cn:9999/websocket';
// const stream = "wss://kline.zb.com:2443/websocket";
// const stream = 'wss://api.zb.cn:9999/websocket';
const stream = "wss://kline.zb.cn/websocket";
const WebSocket = require('ws');
const request = require('request');
const crypto = require('ezcrypto').Crypto;
......@@ -66,7 +66,7 @@ const _handleSocketError = function(error) {
const _handleSocketOpen = function(opened_callback) {
console.log("open");
for (const symbol of observerSymbol) {
const req = {event: 'addChannel', channel: symbol + '_depth'};
const req = {event: 'addChannel', channel: symbol + '_depth', isZip: 'true', binary: 'true'};
console.log(JSON.stringify(req));
this.send(JSON.stringify(req));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment