Options not getting cancelled and always shows it is in process

r2k1984
Hi,

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.

  • SRIJAN
    Are you trying to cancel order or exit a position??
  • r2k1984
    Cancel the position and it is always saying order is in process. But actually order can be cancelled manually.
  • SRIJAN
    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 .
  • r2k1984
    Hey sorry @SRIJAN . 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.
  • sujith
    @r2k1984,
    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.
  • r2k1984
    @sujith - 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
  • sujith
    sujith edited April 2022
    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.
  • r2k1984
    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
  • sujith
    You can run pykiteconnect with debug logs on and see the outgoing requests.
    This is working fine at our end.
Sign In or Register to comment.