I am calling positions api every 30 mins to verify total PnL of my positons. Calling it directly is working fine. But when its getting called from python apscheduler>BackgroundScheduler its giving below error.
SSLError(MaxRetryError("HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /portfolio/positions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1002)')))"))}