It looks like you're new here. If you want to get involved, click one of these buttons!
ptime=time.time()
a=re.post('https://api.kite.trade/orders/regular',data={'variety': 'regular', 'exchange': 'NSE', 'tradingsymbol': 'ICICIBANK', 'transaction_type': 'SELL', 'quantity': 50, 'product': 'MIS', 'order_type': 'MARKET'},headers={'X-Kite-Version': '3', 'User-Agent': 'Kiteconnect-python/3.9.4', 'Authorization': 'token api:token'})
print(time.time()-ptime,'first time')
this is taking almost 7 seconds every time in response
This looks like your local network problem.
The KiteConnect python client has a default timeout of 7 seconds .
https://github.com/zerodha/pykiteconnect/blob/8e36dde9fe34bb0c7c5677a4dc0fb0b1beb40787/kiteconnect/connect.py#L37
Actually,I have read somewhere by Rakesh Sir that the APIs have a internal timeout of 3 seconds,so 7 seconds is definitely a network problem.
It seems like something is blocking your network.
You need to debug at your end.
This thread might help you:
https://kite.trade/forum/discussion/comment/35286/#Comment_35286
So it's not timeout i think
Or is it also network issue at my end
As one of my friend from different states having same issue his code was also working fine earlier
Read the thread I shared,the solution has been given by Rakesh Sir.