sammchardy / python-kucoin

Kucoin REST and Websocket API python implementation
https://python-kucoin.readthedocs.io/en/latest/
MIT License
349 stars 147 forks source link

Cancel all orders for a certain symbol not working #57

Open nielskool opened 5 years ago

nielskool commented 5 years ago

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

nielskool commented 5 years ago

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'])
LeKlex commented 5 years ago

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!

CopyPasteJedi commented 3 years ago

Anyone know why this method not working?