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

CancelOrderBatch #138

Open
ialeev1234 opened this issue Sep 12, 2023 · 0 comments
Open

CancelOrderBatch #138

ialeev1234 opened this issue Sep 12, 2023 · 0 comments

Comments

@ialeev1234
Copy link

ialeev1234 commented Sep 12, 2023

Versions

OS:       linux
Python:   3.10
krakenex: 2.1.0

What are you trying to achieve?

Cancel batch of orders

# code sample
self.client.query_private('CancelOrderBatch', {'orders': orders_to_cancel})

What do you expect to happen?

Cancel listed orders

What happens instead?

Error: {'error': ['EGeneral:Invalid arguments:orders']}

{'error': ['EGeneral:Invalid arguments:orders']}

Support says: instead of 'application/x-www-form-urlencoded' for CancelOrderBatch method use 'application/json'
In other words: in _query method should be option to use json parameter to call a post.

self.response = self.session.post(url, data = data, headers = headers,
                                          timeout = timeout)

And in some methods should be used this JSON option.

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

1 participant