Getting the wrong status for orders placed from trade button

finaureus
Getting the wrong status for orders placed from the trade button.
If I placed an order from the trade button aftermarket hours, then we got the following as the Market is closed right now (attachment added for reference)

Then even after the orders are failed I am getting status as a success, that should not be a case.

If all orders are getting failed API should not return success.
  • rakeshr
    @finaureus
    If all orders are getting failed API should not return success
    Can you paste complete response for this?
  • finaureus
    As per Trade Documentation finished method which is called after execution of trades returns only string so don't able to understand what you mean to say complete response.

    Please refer the code below

    KiteConnect.finished((status, request_token) => {
    });


    The parameter status always returns success despite of actual order status.
  • finaureus
    Any updates?
  • sujith
    It means order placement is successful. It doesn't guarantee that the order is executed or not.
  • finaureus
    No due to insufficient funds in account all orders are getting failed still I am getting a response as a Success.

    And also if I closed the window from the trade button then no method is called
  • sujith
    Like I mentioned above, success only indicates that order placement went through.
  • sujith
    It doesn't know whether order is open, rejected or complete.
  • finaureus
    thanks, sujith.

    if I closed the window from the trade button Is there any method got called?
  • sujith
    If the user clicks on cancel button then the cancelled callback is called.
  • finaureus
    It should be called on window close as well so control can be transferred to the parent screen
  • sujith
    We will add it in future releases, but not all browsers honor that.
  • finaureus
    Thanks, sujith will note that
Sign In or Register to comment.