@tahseen Yeah, with help of Srijan, I figured this is the case.
Only thing that remains now is locating the root cause of code breaking error, as it happens when neither any calculations are running, nor am I subscribed to any instrument.
In abov…
write 1/0 inside on_ticks and the TCP error will occur.
This is helpful, now I can catch this error and restart script somehow (if possible) on this event.
might be happening due to really heavy computation.
hmm, not sure about this one, as I don't …
I was unable to pinpoint issue last time as well.
You said
SRIJAN: June 14 :
This error generally happens due to some internal error in your program which causes the websocket to disconnect.
But
[2022-07-12 17:57:29,130] INFO - Connection Closed !…
@SRIJAN
Now, I'm not sure how should I handle connection drop at some time after access token was expired and updated in global variable, is this correct way to go about it?
def on_close(ws, code, reason):
....ticks_logger.info(f"Connection Close…
So,reconnection won't work in case access token expires. It will give error 403 .
whoa!
I'm glad I asked this query, this is very valuable info.
if you are confident there will be no disconnections
Even though I have everything hosted on AWS, stil…
@SRIJAN
Say I established a websocket connection, everything going smooth, next day, after access_token which I used to create connection in 1st place expires, as I understand, connection will still be smooth.
My query is, if there's a connection e…
I only fetch instruments file once during login time each day.
But this error came when i was debugging something locally, I did fetch this file multiple times during debugging, can that cause 502?
Hi @SRIJAN
Everything seems to be working fine now, I had websocket connected in the morning with different id, forgot about that.
Now
If you can tell me a little about my following queries, that'd be great.
best way to know if I have an open po…
Thanks for fast reply.
Wait, did you connect to the websocket. kws.connect() ??
Yes. I did. That's why I mentioned that ticks are working fine.
Now I will..
place order via api and exit via api
place order via api and exit from web dashboard
…
You will get a message on websocket about the trade
Can you elaborate this a little. What do you mean by 'message about the trade'?
As on_message is a raw callback for data. Kite Connect already does all the processing and gives me back data on on_t…
@SRIJAN @vijoeyz Appreciate your responses, helped me a lot.
I looked up about threading, and it's very fascinating, although I do have one query:
Ques: even if I use a different thread to perform calculations (and possibly place order), (refer thi…
@SRIJAN I am planning to do few computations and even place order inside on_ticks, is there any way around that to avoid mentioned problem?
P.S. assume ideal network connection