Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!isPresent(index)) {
UNFILLED.push(symbol);
console.log('Added ' + symbol + ' (' + askDepth + '/' + bidDepth + ') - ' + UNFILLED.length);
}
} else if (isPresent(index)) {
UNFILLED.splice(index, 1);
console.log('Removed ' + symbol + ' (' + askDepth + '/' + bidDepth + ') - ' + UNFILLED.length);
}
sockets.emit('depth:new', {
ticker: symbol,
unfilled: UNFILLED,
time: new Date().getTime(),
bid: bids,
ask: asks,
market: (parseFloat(binance.first(bids)) + parseFloat(binance.first(asks))) / 2
});
}, LIMIT);