I'm storing 'ticks' data in .txt format in on_tick function. Currently I'm storing data of two stocks only. I have checked the txt file many times. sometimes there is tick data for both the stocks, sometimes there is tick data for any of either stocks. Why am I not getting tick data of both stocks all the time? please take a look at the sample below. please help
A new tick is only generated when any of the values change with respect to the previous tick. If there is no change, then the same tick isn't re-published.
[{'tradable': True, 'mode': 'full', 'instrument_token': 738561, 'last_price': 1112.5, 'last_quantity': 10, 'average_price': 1111.82, 'volume': 2703751, 'buy_quantity': 387900, 'sell_quantity': 1444635, 'ohlc': {'open': 1112.0, 'high': 1115.8, 'low': 1107.05, 'close': 1104.65}, 'change': 0.7106323269813886, 'last_trade_time': datetime.datetime(2019, 1, 9, 12, 26, 27), 'oi': 0, 'oi_day_high': 0, 'oi_day_low': 0, 'timestamp': datetime.datetime(2019, 1, 9, 12, 26, 28), 'depth': {'buy': [{'quantity': 42, 'price': 1112.4, 'orders': 5}, {'quantity': 1, 'price': 1112.35, 'orders': 1}, {'quantity': 21, 'price': 1112.3, 'orders': 4}, {'quantity': 35, 'price': 1112.2, 'orders': 1}, {'quantity': 224, 'price': 1112.15, 'orders': 4}], 'sell': [{'quantity': 5, 'price': 1112.45, 'orders': 1}, {'quantity': 100, 'price': 1112.55, 'orders': 1}, {'quantity': 39, 'price': 1112.6, 'orders': 1}, {'quantity': 52, 'price': 1112.65, 'orders': 1}, {'quantity': 101, 'price': 1112.7, 'orders': 4}]}}]
received for both the stocks
[{'tradable': True, 'mode': 'full', 'instrument_token': 738561, 'last_price': 1111.9, 'last_quantity': 10, 'average_price': 1111.83, 'volume': 2716305, 'buy_quantity': 377958, 'sell_quantity': 1449606, 'ohlc': {'open': 1112.0, 'high': 1115.8, 'low': 1107.05, 'close': 1104.65}, 'change': 0.6563164803331372, 'last_trade_time': datetime.datetime(2019, 1, 9, 12, 27, 57), 'oi': 0, 'oi_day_high': 0, 'oi_day_low': 0, 'timestamp': datetime.datetime(2019, 1, 9, 12, 27, 59), 'depth': {'buy': [{'quantity': 23, 'price': 1111.9, 'orders': 4}, {'quantity': 48, 'price': 1111.85, 'orders': 2}, {'quantity': 3, 'price': 1111.8, 'orders': 2}, {'quantity': 4, 'price': 1111.75, 'orders': 2}, {'quantity': 230, 'price': 1111.7, 'orders': 19}], 'sell': [{'quantity': 202, 'price': 1111.95, 'orders': 2}, {'quantity': 318, 'price': 1112.0, 'orders': 6}, {'quantity': 45, 'price': 1112.05, 'orders': 1}, {'quantity': 161, 'price': 1112.1, 'orders': 2}, {'quantity': 85, 'price': 1112.15, 'orders': 2}]}}, {'tradable': True, 'mode': 'quote', 'instrument_token': 5633, 'last_price': 1470.5, 'last_quantity': 14, 'average_price': 1474.5, 'volume': 133195, 'buy_quantity': 103306, 'sell_quantity': 117040, 'ohlc': {'open': 1484.0, 'high': 1485.0, 'low': 1468.05, 'close': 1480.4}, 'change': -0.6687381788705816}]
okay, thank you