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

display API results and error messages #54

Closed
gnoe8307 opened this issue Oct 4, 2017 · 2 comments
Closed

display API results and error messages #54

gnoe8307 opened this issue Oct 4, 2017 · 2 comments

Comments

@gnoe8307
Copy link

gnoe8307 commented Oct 4, 2017

hi,
first of all thanks for the great job you did here.

Would there be a way to display the API results messages, more precisely the errors when running a script?
I have used the order-conditional-close.py with success, but some of my calls were wrong at first attempts, and it's pretty hard to debug without knowing what's wrong.

Is there a way to display what Kraken API gives as a feedback?

thanks

@gnoe8307 gnoe8307 changed the title get API results and error messages display API results and error messages Oct 4, 2017
@veox veox added the question label Oct 5, 2017
@veox
Copy link
Owner

veox commented Oct 5, 2017

OS/Python/krakenex versions?.. (Please use the issue template next time.)

In general, the JSON response should have an error array, which is empty in the case of no-error:

import pprint
import krakenex

k = krakenex.API()
k.load_key('kraken.key')

response = k.query_private('AddOrder', {<rest of query>})
pprint.pprint(response)

Will give something like:

{'error': [], 
 'result': {<non-error response will be here>}}

@veox veox added the need info label Oct 5, 2017
@veox veox added the stale label Oct 20, 2017
@veox
Copy link
Owner

veox commented Nov 12, 2017

Closing as stale.

@veox veox closed this as completed Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants