Commit 8e3a4cf3 by ken

试试看

parent 29f09387
...@@ -179,11 +179,9 @@ function depthByRest(symbol,callback) { ...@@ -179,11 +179,9 @@ function depthByRest(symbol,callback) {
const key = symbol.replace('_', '').toUpperCase() + 'DEPTH@zb'; const key = symbol.replace('_', '').toUpperCase() + 'DEPTH@zb';
symbol = symbol.toUpperCase(); symbol = symbol.toUpperCase();
const lastEventTime = lastEventTimeMap[symbol] || 0; const lastEventTime = lastEventTimeMap[symbol] || 0;
if (data.timestamp >= lastEventTime) { if (data.timestamp > lastEventTime) {
lastEventTimeMap[symbol] = data.timestamp; lastEventTimeMap[symbol] = data.timestamp;
console.log(symbol + '@' + data.timestamp * 1000 + ' from rest'); console.log(symbol + '@' + data.timestamp * 1000 + ' from rest');
console.log(data.asks.reverse());
console.log(data.bids);
const publishContent = JSON.stringify({symbol, time: data.timestamp * 1000}); const publishContent = JSON.stringify({symbol, time: data.timestamp * 1000});
const asks = data.asks.reverse(); const asks = data.asks.reverse();
const bids = data.bids; const bids = data.bids;
......
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