Closed Gondee closed 7 years ago
Good spot Josh, nice one. The adapter code was out of date. GDAX now return the cancelled orderId in the payload instead of 'OK'. Code fixed and integration tests pass. Also running on GDAX now and cancelling fine.
If you fancy a go at fixing code next time, just send a PR in... check out the https://github.com/gazbert/bxbot/blob/master/CONTRIBUTING.md link - it's dead easy, and you'll become a contributor to the project :-)
Released.
On canceling an order, the adapter looks for the payload to equal OK. Line 283 - GDAX Exchange Adapter It should be looking for the ReasonPhrase, as I have corrected below. :)
if (response.getReasonPhrase().equalsIgnoreCase("OK")) { return true; } else { final String errorMsg = "Failed to cancel order on exchange. Details: " + response; LOG.error(errorMsg); return false; }
I'm not too familiar with patching other peoples projects on Github, so not really sure where to start with that. Im going to look into it for next time! Anyway, the fix is above! :)