Session got Expired in between the market working hours


  • Hello @Moderator_2, @administrators

    I have generated a session at 09:00 AM using my credentials and as per my code the session should only terminate at 15:15 PM, but my session got terminated in between hours. In the below referred screenshot you can see that I was able to ping and get the LTP data of BANKNIFTY futures but when trying to place an order it has thrown me this error.

    After restarting the code it worked fine but I wanna know the reason for its termination. Also I am using the getLTPData() to check my SmartApi connection is active or not, but based on my connection if it returns the LTP data as shown in the screenshot below and throws me an error while placing order what needs to be done?

    I am not able to attach the screenshot of the error message its showing me a popup saying that, Something went wrong while parsing server response while uploading.


  • Hi @Preetham

    We are able to notice there is multiple session created for single ID. Please validate and let us know if required no. of sessionID is generated.
    Please note: We invalidate sessions if it reaches our threshold.

    Regards,
    SmartAPI team


  • Hello @Moderator_2, any update regarding this?


  • @Moderator_2 Today all client's token is expired.
    getting rejected while placing an order
    AG8001 - Invalid Token


  • Hello @Moderator_2 , I have faced this issue once again today. Please refer the below screenshot in which you can see that I got the LTP data of the BNF future but while trying to place the order it is throwing me an error that session has expired. Please update me regarding this issue.

    362418b4-cce3-4bcd-86fd-4e26fbe633ee-image.png


  • Hello @Moderator_2 please refer to the details below,

    Client ID: B430541
    Date of Issue : 20-02-2024
    Issue : Session terminated in between market hours and unable to place the orders but was able to fetch the LTP data of the BNF future.


  • hi @Preetham

    Apologies for your trouble. Kindly share us the client code and date of the issue to analyze further on this.

    Regards,
    SmartAPI team