Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createLimitOrder: function(pairName, sideBuy, price, quantity, next) {
quantity = this.normalizeAmount(pairName, quantity, price)
price = this.fixPrice(pairName, price)
//BUY
if(sideBuy) {
binance.buy(pairName, quantity, price, {type:'LIMIT'}, function(error, response) {
next(error, response.orderId, quantity, response.status == "FILLED")
});
}
//SELL
else {
binance.sell(pairName, quantity, price, {type:'LIMIT'}, function(error, response) {
next(error, response.orderId, quantity, response.status == "FILLED")
});
}
},
createStopLimitOrder: function(pairName, sideBuy, price, stopPrice, quantity, next) {