Sample python code to get realtime data of all the listed stocks of nse using fyers api
You can use the below link to get websocket real time data,
https://github.com/FyersDev/fyers-api-sample-code/blob/sample_v2/My%20API%20Sample%20Script(GET%20STARTED)/websocket%20sample%20script/websocket_foreground.py
Use this code