Websocket to fetch options data
-
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
-
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:
-
@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 -
@devenderweb Please check the above reply. It should help.
Let us know if you still have issues.
Thank you.
Regards
SmartAPI Team -
@Moderator_1
It worked thanks.