Skip to content

Commit

Permalink
[GB] add more debug information on binance trade match fail, see askm…
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Sep 20, 2018
1 parent 2271428 commit 22fca69
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions exchange/wrappers/binance.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,20 @@ Trader.prototype.getOrder = function(order, callback) {
});

if(!trades.length) {
console.log('cannot find trades!', { order, list: data.map(t => t.orderId) });
return callback(new Error('Trades not found'));
console.log('cannot find trades!', { order, list: data.map(t => t.orderId).reverse() });

const reqData = {
symbol: this.pair,
orderId: order,
};

this.binance.queryOrder(reqData, (err, resp) => {
console.log('couldnt find any trade for order, here is order:', {err, resp});

callback(new Error('Trades not found'));
});

return;
}

_.each(trades, trade => {
Expand Down

0 comments on commit 22fca69

Please sign in to comment.