kws.connect() '' We use the above on_connect function for subscribing stocks for tick data, we pass the list with instrument_tokens of all the instruments whose tick value we want. Can i by any means change the token list in the middle of the code execution.
For Ex: I'm examining banknifty future and i have some conditions, and if that conditions stands true then i would want ticks data of the option with the nearest strike price. Then i would want to update my subscribed tokens list in the middle of the execution.