How to use the node-binance-api.openOrders function in node-binance-api

To help you get started, we’ve selected a few node-binance-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andresilvasantos / bitprophet / exchange_utils.js View on Github external
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) {