Skip to content

CancelOrderBatch #138

@ialeev1234

Description

@ialeev1234

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions