Navigation

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

    Websocket 2.0, frequently getting 401

    General Discussion
    0
    6
    78
    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.
    • A
      arunsingh last edited by

      Hi @admin ,

      I am getting below error, when I try to authenticate.
      Sometimes it works, but sometimes it give below error.

      I am passing headers as below
      ws.addHeader("Authorization", "Bearer " + token);
      ws.addHeader("x-api-key", apiKey);
      ws.addHeader("x-client-code", clientId);
      ws.addHeader("x-feed-token", feedToken);

      OpeningHandshakeException: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 401 Unauthorized

      1 Reply Last reply Reply Quote 1
      • A
        arunsingh last edited by

        Hi @admin,

        Any changes in WS2.0?
        It was working find but again started getting

        com.neovisionaries.ws.client.OpeningHandshakeException: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 429 Too Many Requests

        Could you please look into this? Error Too many requests is not correct. Getting the same for the st req

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

          @admin, Data not receiving

          V 1 Reply Last reply Reply Quote 0
          • V
            vivekjha05 @arunsingh last edited by

            @bhavesh78patil Not receiving the data today.

            V 1 Reply Last reply Reply Quote 1
            • V
              vivekjha05 @vivekjha05 last edited by

              @vivekjha05 {'subscription_mode': 2, 'exchange_type': 2, 'token': '53395', 'sequence_number': 354983, 'exchange_timestamp': 1667952665900, 'last_traded_price': 1826415, 'subscription_mode_val': 'QUOTE', 'last_traded_quantity': 50, 'average_traded_price': 1822088, 'volume_trade_for_the_day': 8557000, 'total_buy_quantity': 352900.0, 'total_sell_quantity': 244850.0, 'open_price_of_the_day': 1829490, 'high_price_of_the_day': 1830850, 'low_price_of_the_day': 1811950, 'closed_price': 1819400}

              It stops after this packet - which is probably last data from 7th November

              V 1 Reply Last reply Reply Quote 0
              • V
                vivekjha05 @vivekjha05 last edited by

                @vivekjha05 started working now

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