Running into the same issue again receiving ticks very slowly looks like there is a gap of 20 to 30 seconds and more sometimes
Commented all the code and just using the base code:
async def on_message(instance, message):
print_log("Received: " , print_console=True)
print_log(message, print_console=True)
Looks like there is a 1 minute delay happening screenshot below also
Received:
2024-04-30 14:14:47.367632 - <class ‘str’> - Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: ‘14:13:15’}
2024-04-30 14:14:47.380721 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: ‘14:13:15’}
CRUDEOIL
2024-04-30 14:14:49.537246 - <class ‘str’> - CRUDEOIL
Received:
{‘type’: ‘Previous Close’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘prev_close’: ‘28.70’, ‘prev_OI’: 1159344128}
2024-04-30 14:14:49.561809 - <class ‘dict’> - {‘type’: ‘Previous Close’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘prev_close’: ‘28.70’, ‘prev_OI’: 1159344128}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: ‘14:13:15’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.10’, ‘LTT’: ‘14:15:45’}
2024-04-30 14:15:55.875883 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.10’, ‘LTT’: ‘14:15:45’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:15:54’}
2024-04-30 14:15:55.918546 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:15:54’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:15:54’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:15:57’}
2024-04-30 **14:16:07.**419726 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:15:57’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: '14:16:07’}
2024-04-30 14:17:01.826983 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.70’, ‘LTT’: ‘14:16:07’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: '14:17:01’}
2024-04-30 14:17:38.922890 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: ‘14:17:01’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: '14:17:38’}
2024-04-30 14:17:42.688781 - <class ‘dict’> - {‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.00’, ‘LTT’: ‘14:17:38’}
CRUDEOIL
I have run it again the delay is gradually increasing which defeats the purpose of webscokets:
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘27.90’, ‘LTT’: ‘15:07:12’}
CRUDEOIL
Received:
{‘type’: ‘Previous Close’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘prev_close’: ‘28.70’, ‘prev_OI’: 1159344128}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.70’, ‘LTT’: ‘15:08:20’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.70’, ‘LTT’: ‘15:08:29’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.70’, ‘LTT’: ‘15:08:56’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.70’, ‘LTT’: ‘15:08:56’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.70’, ‘LTT’: ‘15:09:08’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.60’, ‘LTT’: ‘15:09:58’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.60’, ‘LTT’: ‘15:09:58’}
CRUDEOIL
Received:
{‘type’: ‘Ticker Data’, ‘exchange_segment’: 5, ‘security_id’: 428868, ‘LTP’: ‘28.60’, ‘LTT’: ‘15:11:06’}
CRUDEOIL