It looks like you're new here. If you want to get involved, click one of these buttons!
def on_connect(ws, response):
ws.subscribe(tokens)
ws.set_mode(ws.MODE_FULL, tokens)
t = []
def on_ticks(ws, ticks):
t.append(ticks)
# as per situations, subscribe to new tokens
ws.subscribe(tokens)
@sujith @rakeshr Please help.
There are initial tokens I sub to that get FULL quote but later ones using ws.subscribe() do not. How to fix this.
edit -
As per this link- https://kite.trade/forum/discussion/4875/web-socket-dynamic-subscription#:~:text=Do you have any specific condition to,,token/list of token)
Do I have to specify the conditions in on_connect? As you can see from the code, the conditions are defined in on_ticks and thats also where I call the ws.subscribe. My on_connect is simple as shown as is, with the initial instruments being passed in the tokens?
But on_connect is just called once so I am not sure how to go about it. Kindly help!