Stop Websocket data from the code

Dear Fyers, I am new to Algo trading and have just begun to develop my own Algo strategy. Presently I am coding in Python. I have to test my code multiple times.

QUERY 1 :

Now when I am running websocket code the tick by tick data is shown on my console. I don’t know how to stop that tick by tick data as I have to customise the function as per my desired output.

I tried following was which didn’t work

  1. fs.exit(0)
  • unsubscribe_symbol = [‘NSE:BANKNIFTY23NOVFUT’]

fs.unsubscribe(symbol=unsubscribe_symbol)

  • Control/ Command + ‘C’

I have manually closed the console. which I think is not the right way.

QUERY 2:

Another problem which I am facing is the chart is being blocked by the notification as shown in the image due to which I am unable to access the menus on the chart. How can I remove it.

Screenshot attached

Hi @luckyrathod.forum-zp4,

You have the option to close the notification in the right corner. For reference, refer to the screenshot. With respect to Algo trading, our concerned team will assist you here.

@ZppA1qLXjC, Please look into it.

Hi @luckyrathod.forum-zp4 ,

If you want to unsubscribe particular symbol from your list you can just unsubscribe that symbol.
DOc for unsubscribe : https://myapi.fyers.in/docsv3#tag/Web-Socket/paths/~1WebSocket/get

If you want to close the connection you can use

fs.close_connection()

by this connection will close