Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Данные в async_market_data_stream перестают приходить #23

Open
artemtyupov opened this issue Apr 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@artemtyupov
Copy link

Что случилось?

В процессе асинхронного цикла по market_data_stream спустя N промежуток времени данные перестают приходить (при этом никаких ошибок от уровня logging.DEBUG не наблюдается)
Перезапуск стрима решает проблему, но выглядит костыльно, хотелось бы избравиться от такого костыля.

Сегодня в течении дня запущенный стрим с 10 утра перезапускался из-за того, что данные переставали приходить в следующие тайминги:
1)2024-04-02 11:50:41.204
2)2024-04-02 11:59:14.333
3)2024-04-02 12:52:49.583
4)2024-04-02 13:04:21.334
5)2024-04-02 13:22:41.850
6)2024-04-02 13:32:57.478
7)2024-04-02 14:12:01.508
8)2024-04-02 15:27:38.520
9)2024-04-02 16:04:42.340
10)2024-04-02 16:33:45.371
11)2024-04-02 19:51:32.035

Ранее таких проблем не было.
Сначала думал это из-за этих вылетов:
2024-04-02 11:18:43.072 ERROR logging - log_error: None MarketDataStream CANCELLED Received RST_STREAM with error code 8

Но тайминги совершенно разные, следственно это какой-то новый баг.
Если нужно еще какие-то данные - предоставлю.

Заранее спасибо!

Воспроизведение

async with AsyncClient(TOKEN) as main_client:
    self.m_market_data_stream = main_client.create_market_data_stream()
    self.m_market_data_stream.trades.subscribe(self.m_list_trades_instruments)
    self.m_market_data_stream.info.subscribe(self.m_list_info_instruments)
    self.m_market_data_stream.order_book.subscribe(self.m_list_orderbook_instruments)
    async for marketdata in self.m_market_data_stream:
        continue

Tinkoff Invest Version

0.2.0-beta97

Python Version

3.11

OS

Windows

Логи

No response

@artemtyupov artemtyupov added the bug Something isn't working label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant