How to get Nifty 200 all listed company real-time data in websocket
-
Hi,
Just want to know how to get nifty 200 company list and real time data in websocket and where/how to apply in the code.
As per webscoket settings
let web_socket = new WebSocket({
client_code: clientId,
feed_token: feedToken,
script: "nse_cm|19913"
});where to apply and how to get all token id..
Please help in this regards..
Thanks
-
@StockM said in How to get Nifty 200 all listed company real-time data in websocket:
where to apply and how to get all token id..
Hi @StockM , please refer following URL to obtain instrument details
https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json
-
from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect #import smartapi.smartExceptions(for smartExceptions) #create object of call obj=SmartConnect(api_key="your api key") obj = SmartConnect(api_key="entery your api key here .check in your profile settings.") data = obj.generateSession("username","password used to login to angel") feedToken = obj.getfeedToken() print(f"feedtoken is {feedToken}")