It looks like you're new here. If you want to get involved, click one of these buttons!
Node JS client
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
Options not getting cancelled and always shows it is in process
I'm trying to cancel the options in my ID and it is not getting cancelled and always show as Uncaught InputException (400) 'Order cannot be cancelled as it is being processed. Try later.'
But the order is in open status and it can be cancelled manually. But the API is not able to cancel the order.
order number - 220419400020564.
Are you trying to cancel order or exit a position??
Cancel the position and it is always saying order is in process. But actually order can be cancelled manually.
I suggest you to learn basic stock market manual trading first.
You can't cancel a position. You can cancel a order. Positions are exited.
To exit a position,you need to place a reverse transaction type order with the same quantity you have .
. I'm trying to cancel the order. I have given the order id above as well.
If you have time please look in to the order id. Thanks for your advise for me to learn basics.
If you see this error, then it means order is undergoing a modification or some kind of action happening on the order already.
If you had sent a cancel request, did you get 200 response with order_id or did you get any other response with error message?
When a user fetches orderbook, the order entry has a status_message field that has a meta data which says why previous operation is not successful. You may check that as well.
- When order cancel request is sent, it is sending a response saying 400 cannot cancel the order but it is cancelling the order in the background.
We need to see why the error message is response as well. Could you please replicate the same issue and let me know
edited April 20
It might be sending 400 for second request whereas the first request has been served successfully. You may run with debug logs on and check. If this was an API issue, then all our production apps will fail and also the other 1000s of production Kite Connect apps.
Sujith - I have checked the duplicate request here and I don't see any duplicate orders in the orders api.
Is there a way you can check your logs for the order posted and share the feedback
You can run pykiteconnect with debug logs on and see the outgoing requests.
This is working fine at our end.