Commit f8845e4c by ken

depth

parent 1a9b5d1b
......@@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"ezcrypto": "0.0.3",
"pako": "^1.0.6",
"redis": "^2.8.0",
"request": "^2.85.0",
"ws": "^5.1.0"
......
......@@ -2,6 +2,7 @@
const stream = "wss://kline.zb.cn/websocket";
const WebSocket = require('ws');
const request = require('request');
const pako = require('pako');
const crypto = require('ezcrypto').Crypto;
const ips = require("./util").allIps;
const options = {};
......@@ -108,6 +109,9 @@ const _subscribe = function(callback, opened_callback = false) {
function subscribe() {
_subscribe((data) => {
data = pako.inflate(data, {
to: 'string'
});
if (data.channel === accountInfoChannel) {
try {
const coins = data.data.coins;
......
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