I would like to store the tick data into candlesticks and I have written a code for the same. What happens is when I run the code, the data of different instruments gets mixed even though I have tried to make an object for each and every instrument. I am also checking if the instrument token is same or not at every step (which is not necessary I suppose) Here is my code, do let me know if anyone can diagnose where the problem is.
from kiteconnect import KiteTicker; from kiteconnect import KiteConnect; import logging import time,os,datetime,math;