I need to subscibe to say 50 symbols and check their quotes and based on conditions i want to put buy/sell orders or modify existing positions . I assume kws.connect(threaded=True) will enable multi threading.so my question is 1)In my case will multi threading improve the performance? is it required or single thread is sufficient in this case? if not when it is useful to have multi threading 2) do i need to do anything extra apart from kws.connect(threaded=True) for multi threading? 3) how to control/set the number of threads required for this? Suppose, if i want to have separate thread for each symbol , and strategy code for each symbol will be executed in parallel, how can this be achieved?
@sovan_nit `threaded=True` runs the Ticker connection in separate thread instead of main thread, if you don't have `threaded=True` then it will be blocked in main thread when you do `kws.connect` call. Its not possible to have separate thread for each symbol, you can only run entire ticker in different thread and data will be sent to main thread via callbacks.
Above debug log is not an error, you need to make POST request to /session/token to get access_token, to be used further.You can look this documentation. Are you able to generate access_token successfully post login?
You are using older version kite connect example.You can check Kite ticket python example here.
kws.connect(threaded=True)
an it is giving me this error:
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 200 None.
I need to subscibe to say 50 symbols and check their quotes and based on conditions i want to put buy/sell orders or modify existing positions . I assume kws.connect(threaded=True)
will enable multi threading.so my question is
1)In my case will multi threading improve the performance? is it required or single thread is sufficient in this case? if not when it is useful to have multi threading
2) do i need to do anything extra apart from kws.connect(threaded=True) for multi threading?
3) how to control/set the number of threads required for this? Suppose, if i want to have separate thread for each symbol , and strategy code for each symbol will be executed in parallel, how can this be achieved?
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 200 None.
access_token
, to be used further.You can look this documentation.Are you able to generate access_token successfully post login?