Skip to content

How to cancel an order? #85

@dtlink

Description

@dtlink

Versions

OS:       Linux
Python:   3
krakenex: 

What are you trying to achieve?

To cancel an order that was not executed.

I managed to buy with the code below. I want the same to cancel an order.
Where's the documentation about what query_private() can accept as arguments instead of AddOrder?

# code sample

k.query_private('AddOrder',
                {'pair': tradepair,
                 'type': 'buy',
                 'ordertype': 'limit',
                 'price': buy_price,
                 'volume': volume_units,
                 # only `ordertype`, `price` and `price2` are valid
                 'close[ordertype]': 'limit',
                 'close[price]': sell_price,
                 # these will be ignored!
                 'close[pair]': tradepair,
                 'close[type]': 'sell',
                 'close[volume]': volume_units})

What do you expect to happen?

Order should be cancelled.

What happens instead?

# error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions