Navigation

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

    Websocket to fetch options data

    Python SDK
    0
    5
    39
    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.
    • W
      whemant last edited by

      Hello,

      I am using Websocket to fetch live data for stocks. I have a requirrement to fetch index options data. Please can somebody confirm what value I need to pass to exchangeType? I tried using various values as mentioned in the code:

                      exchangeType: integer
                      possible values ->
                          1 -> nse_cm
                          2 -> nse_fo
                          3 -> bse_cm
                          4 -> bse_fo
                          5 -> mcx_fo
                          7 -> ncx_fo
                          13 -> cde_fo
      

      But none of these are producing the results.

      Is there any other change I need to do to get index option data?

      Thanks in advance

      M 1 Reply Last reply Reply Quote 0
      • devenderweb
        devenderweb last edited by

        I am using Websocket to fetch live data for stocks. I have a requirrement to fetch index options data. Please can somebody confirm what value I need to pass to exchangeType? I tried using various values as mentioned in the code:

        M 1 Reply Last reply Reply Quote 0
        • M
          Moderator_1 @whemant last edited by

          @whemant You can check the requisite segment for your required scrip on the Scrip Master Json. Here is the link
          The particular indices, i.e. NIFTY, BANKNIFTY come under NSE_CM segment.
          Index Options with Expiry and Strike prices will be under NSE_FO segment.

          Hope it helps.

          Thank you.
          Regards
          SmartAPI Team

          W 1 Reply Last reply Reply Quote 0
          • M
            Moderator_1 @devenderweb last edited by

            @devenderweb Please check the above reply. It should help.

            Let us know if you still have issues.

            Thank you.

            Regards
            SmartAPI Team

            1 Reply Last reply Reply Quote 0
            • W
              whemant @Moderator_1 last edited by

              @Moderator_1
              It worked thanks.

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