Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
accountOpenOrders: function(pairName, next) {
binance.openOrders(pairName ? pairName : false, (error, response) => {
if (error) {
next("Error reading open orders: " + error)
return
}
var orders = []
for (var i = 0; i < response.length; ++i) {
var order = response[i]
orders.push({id: order['orderId'], pairName: order['symbol'], side: order['side'], amount: order['origQty'], price: order['price']})
}
next(null, orders)
})
},
tokenPrice: function(pairName, next) {