diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index 849901cf..85ee7de6 100755 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -598,7 +598,7 @@ async def subscribe(ws: wsproto.WSConnection, connect_id, sym): @trio_async_generator async def stream_messages( ws: NoBsWs, sym: str -) -> AsyncGenerator[NoBsWs, dict]: +) -> AsyncGenerator[tuple[str, dict], None]: timeouts = 0 last_trade_ts = 0 @@ -612,7 +612,6 @@ async def stream_messages( await ws._connect() continue - if msg.get('subject'): msg = KucoinMsg(**msg) match msg.subject: @@ -672,6 +671,8 @@ async def stream_messages( } + + @acm async def open_history_client( symbol: str,