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

Merge #23

Merged
merged 8 commits into from
Sep 18, 2018
Prev Previous commit
Next Next commit
[GB] provide fill information on coinfalcon cancel
  • Loading branch information
askmike committed Sep 16, 2018
commit b22afa571582146960532ab3dc3c29cce4de7837
7 changes: 4 additions & 3 deletions exchange/wrappers/coinfalcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ Trader.prototype.retry = function(method, args) {

// run the failed method again with the same arguments after wait
setTimeout(() => {
console.log('cf retry..');
console.log(args);
method.apply(this, args);
}, wait);
};
Expand Down Expand Up @@ -257,6 +255,7 @@ Trader.prototype.cancelOrder = function(order, callback) {
const args = _.toArray(arguments);

const handle = this.processResponse(this.cancelOrder, args, (err, res) => {

if(err) {
if(err.message.includes('has wrong status.')) {

Expand Down Expand Up @@ -284,7 +283,9 @@ Trader.prototype.cancelOrder = function(order, callback) {
return callback(err);
}

callback(undefined, false);
callback(undefined, false, {
filled: res.data.size_filled
});
});

this.coinfalcon.delete('user/orders/' + order).then(handle.success).catch(handle.failure);
Expand Down