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

Bug in GDAX Exchange adapter #44

Closed
Gondee opened this issue Nov 10, 2016 · 2 comments
Closed

Bug in GDAX Exchange adapter #44

Gondee opened this issue Nov 10, 2016 · 2 comments

Comments

@Gondee
Copy link
Contributor

Gondee commented Nov 10, 2016

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! :)

gazbert added a commit that referenced this issue Nov 12, 2016
GDAX adapter was returning incorrect cancel order status despite the order being cancelled successfully.
The Exchange API was changes to return orderId in response payload - the adapter code was out of date. Thanks for @Gondee for reporting this.

Also bumped up versions for next RC candidate.
@gazbert
Copy link
Owner

gazbert commented Nov 12, 2016

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 :-)

@gazbert
Copy link
Owner

gazbert commented Nov 12, 2016

Released.

@gazbert gazbert closed this as completed Nov 12, 2016
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

2 participants