It looks like you're new here. If you want to get involved, click one of these buttons!
def main()
def on_tick(tick,ws):
#Do a lot of things based on tick..
# While doing some check in a "new thread" i find that i need tick data for a new script
# How can i update the tick / tokens to let WS know that a new set of tokens has arrived and
# real time ticks are needed against this new set?
def on_connect(ws):
ws.subscribe(tokens)
ws.set_mode(ws.MODE_LTP, tokens)
kws.on_tick = on_tick
kws.on_connect = on_connect
You can call subscribe again with new tokens and that will send a text message to Kite Ticker again with new tokens and you will get ticks after that, just like earlier tokens.
Subscribing to new tokens will not result in unsubscribe of old tokens.
What if I have to remove a specific token? Can I unsubscribe a single token while other tokens continue to be subscribed?