Hi Aditya,
https://stackoverflow.com/questions/19782075/how-to-stop-terminate-a-python-script-from-running331
You can look into the above link.
Question
FYERS API Fyers team,\Can someone pls help, why my code gets stucks in websocket subscribe. How to terminate this..pls help. please share the method to stop websocket streaming
Fyers team,\Can someone pls help, why my code gets stucks in websocket subscribe. How to terminate this..pls help. please share the method to stop websocket streaming
Join FYERS Community to pick others' brains on Trading/Investing