@nahas_n I entered the following for my WebSocket and ran the code. As the market is closed now, I am getting the following response. Is it correct?
FEED_TOKEN=feedToken
CLIENT_CODE="A539902"
token ="nse_cm|26009"
task="sfi"
__on_open################
{'task': 'cn', 'channel': 'NONLM', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
2021-06-12 23:23:00.895759 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
on open
Ticks: [{'ak': 'ok', 'msg': 'connected', 'task': 'cn'}]
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
Ticks: [{'ak': 'ok', 'msg': 'sfi', 'task': 'sfi'}]
2021-06-12 23:23:30.902385 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:24:00.911174 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:24:30.915961 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:25:00.921621 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:25:30.925889 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:26:00.934004 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
2021-06-12 23:26:30.945869 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '096355569', 'user': 'A539902', 'acctid': 'A539902'}
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]