Reconnecting with Web Socket

Hi @satyamtd, modify the preference list that you are subscribing via websocket and then re run the program. Your updated list will be subscribed and you will be receiving the live data of updated list.

Find an example code in python below -

customerPreferences = []

preference1 = {
    "actionType": 'ADD',  # 'ADD', 'REMOVE'
    "modeType": 'LTP',  # 'LTP', 'FULL', 'QUOTE'
    "scripType": 'INDEX',  # 'ETF', 'FUTURE', 'INDEX', 'OPTION', 'EQUITY'
    "exchangeType": 'NSE',  # 'BSE', 'NSE'
    "scripId": '13'
}

customerPreferences.append(preference1)

preference2 = {
    "actionType": 'ADD',  # 'ADD', 'REMOVE'
    "modeType": 'FULL',  # 'LTP', 'FULL', 'QUOTE'
    "scripType": 'EQUITY',  # 'ETF', 'FUTURE', 'INDEX', 'OPTION', 'EQUITY'
    "exchangeType": 'NSE',  # 'BSE', 'NSE'
    "scripId": '3456'
}

customerPreferences.append(preference2)
2 Likes