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

Cannot Cancel an order, error (code=-2011)

Open Ali-Ebrahimi opened this issue 5 years ago • 5 comments

Hi I have tried the following both but I have this error: binance_client.cancel_order(symbol=Ticker, orderId=Orders_NEW['orderId'][4], origClientOrderId = Orders_NEW['clientOrderId'][4]) binance_client.cancel_order(symbol=Ticker, orderId=Orders_NEW['orderId'][4])

APIError(code=-2011): Unknown order sent.

Ali-Ebrahimi avatar Oct 12 '20 19:10 Ali-Ebrahimi

I have the same problem but in Futures API.

Can't cancel any order

Even using directly : binance_client._request_futures_api('delete', 'order', True, data={'symbol': 'LUNAUSDT','orderId': 3075632315})

Always get: APIError(code=-2011): Unknown order sent

xavixicota avatar Oct 30 '21 11:10 xavixicota

i have the same problem

fluoz avatar Feb 04 '22 08:02 fluoz

Hi I have tried the following both but I have this error: binance_client.cancel_order(symbol=Ticker, orderId=Orders_NEW['orderId'][4], origClientOrderId = Orders_NEW['clientOrderId'][4]) binance_client.cancel_order(symbol=Ticker, orderId=Orders_NEW['orderId'][4])

APIError(code=-2011): Unknown order sent.

USE THIS:- result = client.futures_cancel_order( symbol=symbol, orderId=orderId) ) This solved it for me

Yash-Belekar avatar Jun 08 '22 13:06 Yash-Belekar

I'm getting this error when trying to cancel a OCO order

client.cancel_margin_order(
    symbol='BTCUSDT',
    orderId='11689712515')

binance.exceptions.BinanceAPIException: APIError(code=-2011): Unknown order sent.

Karlheinzniebuhr avatar Jul 18 '22 18:07 Karlheinzniebuhr

same problem. If anyone know how to resolve this please advise

capaj avatar Feb 07 '24 18:02 capaj