python-kucoin icon indicating copy to clipboard operation
python-kucoin copied to clipboard

Cancel all orders for a certain symbol not working

Open nielskool opened this issue 5 years ago • 3 comments

client.cancel_all_orders('DATX-BTC') cancels all orders not only the ones from DATX-BTC.

nielskool avatar Apr 02 '19 17:04 nielskool

My workaround for now:

    def Cancel_symbol_orders(self, client, symbol):
        orders = client.get_orders(symbol=symbol, status='active')["items"]
        if(len(orders)>0):
            for order in orders:
                if(order['symbol']==symbol):
                    client.cancel_order(order['id'])

nielskool avatar Apr 03 '19 01:04 nielskool

client.cancel_all_orders('DATX-BTC') cancels all orders not only the ones from DATX-BTC.

I was already wondering about getting all orders canceled... thank you for the workaround!

LeKlex avatar Apr 04 '19 08:04 LeKlex

Anyone know why this method not working?

CopyPasteJedi avatar Feb 18 '21 20:02 CopyPasteJedi