python-kucoin
python-kucoin copied to clipboard
Cancel all orders for a certain symbol not working
client.cancel_all_orders('DATX-BTC') cancels all orders not only the ones from DATX-BTC.
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'])
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!
Anyone know why this method not working?