I have made a trial streaming script , but it stops after 1 to 2 mins of activity. Is this Normal behavior or I'm doing something wrong. I would also like to know how can I make it to stream quotes for longer period of times.
If it matters, I'm using Python Client and it serves almost a 100 ticks for the Instruments selected before stopping.
100 tokens?? I have only subscribed to about 50 tokens. Is this why the streaming is stopping automatically. The streaming stops because the process gets completed which should never happen as kite.connect () should be an infinite loop (as it says on the api website).
And will it work if I increase my token subscription from 50 to 100 ? Do I have to subscribe to more than a 100 tokens for the streaming to continue forever ( or atleast during the trading hours)??
Number of tokens you have subscribed for doesn't matter. You can even subscribe for one token. It will only stop when you are explicitly stopping it or it crashes. Try printing exception message and check.
It sounds quite like what I'm facing but i get bout a 100 ticks before getting disconnected and the code after kite.connect() gets executed which should not happen as kite.connect is an infinite loop.
I copied it and ran it. It stopped again after a few minutes. Coz the market is not open right now so I just got one tick while it ran. Log file was created but it was empty with nothing in it. I'll run it again in the morning when the markets open up to see if that changes anything.
It is not normal, once you subscribe for 100 tokens, you keep getting ticks until you unsubscribe for it.
And will it work if I increase my token subscription from 50 to 100 ? Do I have to subscribe to more than a 100 tokens for the streaming to continue forever ( or atleast during the trading hours)??
It will only stop when you are explicitly stopping it or it crashes. Try printing exception message and check.
If you want i can give u a copy of my code.
I did some searching for the issue on this forum and found this https://kite.trade/forum/discussion/822/kws-connect-not-working
It sounds quite like what I'm facing but i get bout a 100 ticks before getting disconnected and the code after kite.connect() gets executed which should not happen as kite.connect is an infinite loop.
I hope this gives you an insight into my problem.
Its almost a copy of the kite webinar script I saw on YouTube .