Commit cec57670 by rongjun

bug

parent c132f75f
......@@ -86,7 +86,8 @@ class biboxApi {
for(const symbol of symbols){
this._subscribeSymbol(wss, id, symbol, depth)
}
}else if(response.topic.startsWith('/trade')){
}else if(response.topic && response.topic.startsWith('/trade')){
console.log(response.data)
const timeStamp = response.data.time;
const symbol = response.data.topic.replace('/trade/','').replace('_TRADE','');
let asks = totalOrderbook[symbol].asks || [];
......@@ -162,7 +163,6 @@ class biboxApi {
}
_subscribeSymbol(wss, id, symbol, depth){
console.log('get symbol...')
const ipAddress = IPs[Math.round(Math.random()*(IPs.length-1))];
this.getOrderbook(symbol,depth,ipAddress,(error,result)=>{
if(error){
......
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