Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Validity of token generated

    General Discussion
    4
    7
    72
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      ForumUser_1 last edited by

      For how long is the token valid? If I generate it at 9am, then will it be valid till 3.30pm? Or do I need to generate intraday again? Also - the token won't get invalidated if I login on app/website?

      punit 1 Reply Last reply Reply Quote 0
      • punit
        punit @ForumUser_1 last edited by punit

        @prateekjjw001 Looks like similar issue.

        https://smartapi.angelbroking.com/topic/166/heartbeats-failed?_=1610625075888

        Multi session ie: parallel session with SmartApi + Web is fixed now. I commented on your Git issue as well.

        1 Reply Last reply Reply Quote 0
        • F
          ForumUser_1 last edited by ForumUser_1

          thanks @Ashok - do you also know how long is the token valid for? @admin

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @ForumUser_1 last edited by

            Hi @prateekjjw001 , JWT token is valid for 2.5 hours (150 minutes).

            punit 1 Reply Last reply Reply Quote 0
            • punit
              punit @admin last edited by

              @admin, 150 Minutes may not be an issue for placing orders and other api calls. But for websocket, we cannot stop the script in between, authenticate and run again losing 10-15 seconds. The whole point of websocket streaming is to have continuous streaming. token validity should be at least10Hrs or 24hrs like most other platforms offer.

              S 1 Reply Last reply Reply Quote 0
              • S
                Surya 1 @punit last edited by

                @Ashok @admin

                I believe 2.5 hours only if WebSocket is not connected right ? I mean generate tokens but don't don anything with it.. it may expire.. but not for connected sessions.. is my understanding correct ??

                one starts 9:15 AM with NSE market and continues till 11:30 PM trading in commodities.. For other platform token is reset everyday morning 6 AM or so.. essentially its valid for 24 hours.. even if one sits idle and not connected.. and this is very convenient. I hope Angel does offer the same.

                punit 1 Reply Last reply Reply Quote 0
                • punit
                  punit @Surya 1 last edited by

                  @rajanprabu, I am not sure .. let me test my theory tomorrow.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post