Ticks missing for randomly for some second

tapanjbhatt
Hello,

Check the debug log below which is printed at every second from websocket:

DEBUG:root:Ticks: [{'tradable': False, 'mode': 'full', 'instrument_token': 256265, 'last_price': 18059.55, 'ohlc':
{'high': 18114.65, 'low': 17791.4, 'open': 17809.1, 'close': 17670.45}, 'change': 2.2019812738215414,
'exchange_timestamp': datetime.datetime(2022, 4, 4, 15, 14, 59)}]
DEBUG:root:Ticks: [{'tradable': False, 'mode': 'full', 'instrument_token': 256265, 'last_price': 18059.6, 'ohlc':
{'high': 18114.65, 'low': 17791.4, 'open': 17809.1, 'close': 17670.45}, 'change': 2.2022642320936807,
'exchange_timestamp': datetime.datetime(2022, 4, 4, 15, 15, 1)}]
DEBUG:root:Ticks: [{'tradable': False, 'mode': 'full', 'instrument_token': 256265, 'last_price': 18058.7, 'ohlc':
{'high': 18114.65, 'low': 17791.4, 'open': 17809.1, 'close': 17670.45}, 'change': 2.1971709831951083,
'exchange_timestamp': datetime.datetime(2022, 4, 4, 15, 15, 2)}]
DEBUG:root:Ticks: [{'tradable': False, 'mode': 'full', 'instrument_token': 256265, 'last_price': 18058.5, 'ohlc':
{'high': 18114.65, 'low': 17791.4, 'open': 17809.1, 'close': 17670.45}, 'change': 2.1960391501065297,
'exchange_timestamp': datetime.datetime(2022, 4, 4, 15, 15, 3)}]
DEBUG:root:Ticks: [{'tradable': False, 'mode': 'full', 'instrument_token': 256265, 'last_price': 18058.25, 'ohlc':
{'high': 18114.65, 'low': 17791.4, 'open': 17809.1, 'close': 17670.45}, 'change': 2.1946243587458114,
'exchange_timestamp': datetime.datetime(2022, 4, 4, 15, 15, 4)}]

As you see, the data for 15:15:00 is not received. This rarely happens but still happens. We calculate the five mins candle and since opening tick of 15:15:00 is not received, the code is not able to decide that new candle is started.

This happens sometimes for the closing tick also, which is normally 59th second of minute. In our database we are missing several candles due to this.

Is this expected? Our assumption is: no matter what, we receive one tick every second.

However this log is disproving it.

Sign In or Register to comment.