binance-exchange/node-binance-api

No way to modify the time in force option when placing orders

markusstephanides opened this issue · 2 comments

No way to modify the time in force option when placing orders

You can change timeInForce now, just make sure you are on the latest version v0.3.8
buy/sell functions take this format
buy: function(symbol, quantity, price, flags = {}, callback = false)
So for the 4th parameter, just pass {timeInForce: 'GTC'}

example:

var quantity = 1, price = 0.069;
binance.buy("ETHBTC", quantity, price, {timeInForce: 'GTC'});

// example with callback

binance.sell("ETHBTC", quantity, price, {timeInForce: 'GTC'}, function(response) {
        console.log(response);
});

Thanks!