I just bought an app today, and am trying to login to the Kite Python API now; I have followed the documentation and youtube videos of my code and process to login, so I'm sure im following the right login flow to connect to the API.
However I am getting the above error whenever I connect to KiteTicker and attempt to run .connect(). I know there have been a few threads citing the same error, and I have been through all of them, and tried the approaches suggested on those, but found no satisfactory.
Please assist me with the same as soon as able, because I am unable to retrieve market tick data as of now from Kite API. Thanks!
from kiteconnect import KiteConnect from kiteconnect import KiteTicker import pandas as pd import numpy as np import os from pprint import pprint import logging import xlwings as xw import datetime import pdb import time
Authentication for Kite Ticker happens only when one is trying to connect. If the connection drops and tries the client tries to reconnect then this could happen when your access token is invalid. You will have to re-login and get new access token and use that.
The reason for disconnection could be because of the main thread overload. You need to make sure, you don't do anything inside on_ticks, you need to offload all the tasks inside that to another thread. You need to make sure that the main thread is always available to receive ticks. It shouldn't do any task inside on_ticks.
The reason for disconnection could be because of the main thread overload.
You need to make sure, you don't do anything inside on_ticks, you need to offload all the tasks inside that to another thread. You need to make sure that the main thread is always available to receive ticks. It shouldn't do any task inside on_ticks.