"your code tries to reuse the connection just as the server is closing it because it has been idle for too long or the local session is timed out" - referring to this, session is getting timed out, is there any way to avoid timeout?
Sure, Thanks Rakesh for your response. I will have to recode to minimize the use of get_position. On "forcibly closed" error, once I entered in a trade, I stay in a loop to wait for target or stoploss which might have caused this error during waitin…
Thanks Rakeshr, get_position is called only before existing or entering the trade. It is important to avoid unnecessary buy or short selling. Do you think get_position is causing me connection error? I haven't received any error on the same code unt…
I am fetching realtime banknifty last_price using below code to check against my target/stoploss, it runs for some time and gives connection Error. I am running this on spyder.
def get_bn_price():
global bn_price
try:
bn_price = (k…