@RS please refer https://github.com/angel-one/smartapi-python/blob/main/SmartApi/smartApiWebsocket.py