Navigation

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

    Dynamic symbol change for websocket

    Python SDK
    pythonsdk websocket
    3
    6
    101
    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.
    • N
      nahas_n last edited by nahas_n

      is it possible to change the streaming symbol after some time to another symbol without disconnecting the websocket and connect again?
      ss.subscribe('newsymbol')
      will fetch new symbol along with old symbol. i need to stop the old symbol without disconnecting the websocket . possible ?

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

        Hi @nahas_n no currently you cannot unsubscribe and subscribe while your websocket is on.

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

          @admin Connecting to the WebSocket endpoint
          The WebSocket URL is:

          wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream

          The WebSocket endpoint is wss:// omnefeeds.angelbroking.com. To establish a connection, you have to pass two query parameters, CLIENT_CODE and FEED_TOKEN.

          Note:-
          1 There will be all input parameter sent in JSON format for all type of task.
          2 To stop (unsubscribe) script feed you need to send “channel” parameter in input JSON object as blank string.
          3 To stop (unsubscribe) index feed you need to send “channel” parameter in input JSON object as blank string.
          4 To start (subscribe) feed (index/script)you need to send input JSON object with “channel” value as mentioned in document
          5 Index Feed : If ampersand (&) value exists in index value , need to replace with exclamatory symbol (!). Eg : bse_cm|BSE Oil&Gas to be sent as bse_cm|BSE
          6 Script feed : for task mw after the acknowledge response, we provide certain script details from mrv which is not available in regular feed , sample is given below :

          code_text
          ```[{"ak":"ok","task":"mw","msg":"mw"}]
          [{"lo":"1797.55","ts":"ACC-EQ","tp":null,"ltp":"1800.05","ltq":"27","bs":"16","tk":"22","ltt":"31\/08\/2017 11:32:01",
          "lcl":null,"tsq":"76435","cng":"-11.15","bp":"1800.00","bq":"510","mc":"34012.01277(Crs)","isdc":"18.77872
          (Crs)","name":"sf","tbq":"76497","oi":null,"yh":"1801.25","e":"nse_cm","sp":"1800.90","op":"1814.00","c": "1811.20",
          "to":"145093696.35","ut":"31-Aug-2017 11:32:01","h":"1817.55","v":"80391","nc":"- 00.62","ap":"1804.85","yl":"1800.00","ucl":null,"toi":"16654000" }]
          

          7 Where added JSONArray with each JSONObject (each sf ) holding mrv script details given in ‘channel’
          Even for Depth feed ( task – dp) as well as index feed ( task – sfi) , we have added first mrv data in response, where field list are same as listed under regular feed response table.

          This is from the documentation. but in python library it is not implemented till yet. any way let proceed this discussion with github 👍

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

            Hi @nahas_n let me cordinate with team and update you on this.

            1 Reply Last reply Reply Quote 0
            • N
              nbmaiti last edited by

              Is there any update on it?

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

                HI @nbmaiti We will update you once this is available.

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