Commit 557ee2ee by ken

depth

parent f9937de0
......@@ -183,7 +183,11 @@ function depthByRest(symbol,callback) {
if (data.timestamp > lastEventTime || (data.timestamp === lastEventTime && JSON.stringify(data) != JSON.stringify(lastDataMap[symbol]))) {
lastEventTimeMap[symbol] = data.timestamp;
lastDataMap[symbol] = data;
if (symbol === "BTCUSDT") {
console.log(symbol + '@' + data.timestamp * 1000 + ' from rest');
console.log(data.asks);
console.log(data.bids);
}
const publishContent = JSON.stringify({symbol, time: data.timestamp * 1000});
const asks = data.asks.reverse();
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