Further issues with testnet: order does not cancel

There seem to be issues with the recent changes to testnet still. Requests to cancel do not actually cancel the order.

For example, cancel all orders for a given symbol:

(DELETE): https://testnet.binance.vision/api/v3/openOrders?symbol=BNBUSDT&timestamp=1646628387430&signature=f2f8400c3a70850ecdff88cb14d391e60a48b31d842da4d53a99d51ca672e0ef

…returns a list of orders with status NEW rather than CANCELED

Same with cancelling an individual order:

(DELETE): https://testnet.binance.vision/api/v3/order?symbol=BNBUSDT&origClientOrderId=m6pqX0VFX3em67Shn3am0n&timestamp=1646628390813&signature=d80301cb96ca0d6d389bece8411c429714d96aa52b891c5de0026a5cb22fece5

… status returned is NEW and the order is not cancelled.

I’m now receiving a MAX_NUM_ALGO_ORDERS error because I cannot remove orders.

Things were working as expected a few days ago.

Thanks for the feedback, I had a try on testnet, can’t reproduce the issue. All my open orders are cancelled.

Can you query the status of the order and try again?

and also please try on again on a different symbol, and see if you can cancel all open orders.

thanks

Cancels are still not working. I have a simple test script that does various things like cancel all orders (clean slate), places an order, queries it, then a second later cancels it. Normally by the end of the script there should be zero open orders, but the order placed each run persists.

It may be important to note that I am using STOP_LOSS_LIMIT, one of the order types which temporarily disappeared when testnet started misbehaving for people.

I tried with ETHUSDT and the same thing happens.

Here’s an example order:

(POST) https://testnet.binance.vision/api/v3/order?symbol=ETHUSDT&side=SELL&type=STOP_LOSS_LIMIT&timeInForce=GTC&quantity=1&price=2509.32&stopPrice=2534.92&newOrderRespType=FULL&timestamp=1646657903012&signature=d8da69ee2e5202462ea95b4bbd6ace0f3b0a137ca695fcd5e6a21a034e78dddb

Response:
{"symbol":"ETHUSDT","orderId":1813408,"orderListId":-1,"clientOrderId":"Th9hDJqlktX3ebYoShvtuD","transactTime":1646657903160,"price":"2509.32000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"2534.92000000","fills":[]}

Then the cancel:

(DELETE) https://testnet.binance.vision/api/v3/order?symbol=ETHUSDT&origClientOrderId=Th9hDJqlktX3ebYoShvtuD&timestamp=1646657905120&signature=3f8c4d7cbb1f715b26621eab037c4b1f14e732a3f9621fe35a983d6a83cfb08b

Response still shows status of NEW:
{"symbol":"ETHUSDT","orderId":1813408,"orderListId":-1,"clientOrderId":"Th9hDJqlktX3ebYoShvtuD","price":"2509.32000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"2534.92000000","icebergQty":"0.00000000","time":1646657903160,"updateTime":1646657903160,"isWorking":false,"origQuoteOrderQty":"0.00000000"}

And all orders from previous runs apparently remain open, even though the first part of the script cancels orders. Show open orders:

(GET) https://testnet.binance.vision/api/v3/openOrders?timestamp=1646657906283&signature=9788dcf986f0b00394780b05879a6c96ccbf52e598757d3fc6448d949212673c

Response:

[{"symbol":"BNBUSDT","orderId":1253850,"orderListId":-1,"clientOrderId":"zoMSSioKxxlcuPhaEmskS4","price":"361.82000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"365.51000000","icebergQty":"0.00000000","time":1646628232256,"updateTime":1646628232256,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"BNBUSDT","orderId":1253899,"orderListId":-1,"clientOrderId":"uK0dm6cOERkBk3di0HCqkH","price":"361.91000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"365.61000000","icebergQty":"0.00000000","time":1646628269060,"updateTime":1646628269060,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"BNBUSDT","orderId":1253988,"orderListId":-1,"clientOrderId":"Im6t98KahhvV2unGe7zWmy","price":"361.72000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"365.41000000","icebergQty":"0.00000000","time":1646628350647,"updateTime":1646628350647,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"BNBUSDT","orderId":1254044,"orderListId":-1,"clientOrderId":"m6pqX0VFX3em67Shn3am0n","price":"361.82000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"365.51000000","icebergQty":"0.00000000","time":1646628389414,"updateTime":1646628389414,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"BNBUSDT","orderId":1311594,"orderListId":-1,"clientOrderId":"FoD2zZEAXIyOX59JBEOyvB","price":"370.54000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"374.32000000","icebergQty":"0.00000000","time":1646657714232,"updateTime":1646657714232,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"ETHUSDT","orderId":1812829,"orderListId":-1,"clientOrderId":"QxXj71VHnL1xicj3GgkYWm","price":"2511.46000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"2537.08000000","icebergQty":"0.00000000","time":1646657758469,"updateTime":1646657758469,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"ETHUSDT","orderId":1812878,"orderListId":-1,"clientOrderId":"WmVhzu9Ii35t9gs9YdvocE","price":"2511.50000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"2537.12000000","icebergQty":"0.00000000","time":1646657771359,"updateTime":1646657771359,"isWorking":false,"origQuoteOrderQty":"0.00000000"},{"symbol":"ETHUSDT","orderId":1813408,"orderListId":-1,"clientOrderId":"Th9hDJqlktX3ebYoShvtuD","price":"2509.32000000","origQty":"1.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"2534.92000000","icebergQty":"0.00000000","time":1646657903160,"updateTime":1646657903160,"isWorking":false,"origQuoteOrderQty":"0.00000000"}]

it’s possible that in your second request, it’s not sending as DELETE method. If you are sending as GET, the order will be returned as NEW.

Please try to test with our postman collection, it should be easier for testing. GitHub - binance/binance-api-postman: Postman collection for Binance Public API, including spot, margin, futures, etc.

I think you’ve got it. I checked the libcurl setup code, and it only differentiates between POST and the default (presumably GET). Adding extra code to explicitly use the DELETE method seems to work.

I cannot explain why it has worked previously. I’ve been toying with this for a few weeks, and it has worked as expected until recently.