-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GDAX cancelOrder fix and misc other fixes #1808
Conversation
ACK all your changes, would you mind reverting all the whitespace changes though? (2 space indents and the likes)? Thanks! |
Cleaned up the whitespace a good bit to clarify the changes introduced. |
👍 thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small bug
var result = function(err, data) { | ||
if(err) { | ||
log.error('Error cancelling order:', err); | ||
callback(true); // need to catch the specific error but usually an error on cancel means it was filled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't return here you will also call callback(false).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it was already merged can you implement this fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated my branch with the returns...
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Big Fix / Feature
What is the current behavior? (You can also link to an open issue here)
Same as PR Binance cancelOrder Fix #1806 cancelOrder does not detect filled orders.
What is the new behavior (if this is a feature change)?
Calls to cancelOrder that result in order not found error will presume the order was filled and return true to portfolioManager
Additional minor feature add is to have the ability to enable/disable sandbox using a config value instead of a hard coded boolean in the exchange file itself.
Also same as Binance cancelOrder Fix #1806 I am not 100% this approach is 100% as robust as it could/should be but it works as a stop-gap.
@askmike @cmroche