Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change to new_orders to allow all the options #29

Open
treidio opened this issue Oct 14, 2017 · 0 comments
Open

change to new_orders to allow all the options #29

treidio opened this issue Oct 14, 2017 · 0 comments

Comments

@treidio
Copy link

treidio commented Oct 14, 2017

so if you want to do an oco order, you can get the parameters from the doco and add them in, otherwise pass {} as additional params.

:)

Bitfinex.prototype.new_order = function(symbol, amount, price, exchange, side, type, additional_params, cb) {
var params;
params = {
symbol: symbol,
amount: amount,
price: price,
exchange: exchange,
side: side,
type: type
};
if (typeof additional_params === 'function') {
cb = additional_params;
}else {
for (var key in additional_params) params[key] = additional_params[key];
}
return this.make_request('order/new', params, cb);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant