diff --git a/alpaca_trade_api/polygon/streamconn.py b/alpaca_trade_api/polygon/streamconn.py index 0068ae6f..e14dad85 100644 --- a/alpaca_trade_api/polygon/streamconn.py +++ b/alpaca_trade_api/polygon/streamconn.py @@ -124,7 +124,7 @@ async def _ensure_ws(self): try: await self.connect() if self._streams: - await self.subscribe(self._streams) + await self.subscribe(list(self._streams)) break except Exception as e: await self._dispatch({'ev': 'status', diff --git a/alpaca_trade_api/stream2.py b/alpaca_trade_api/stream2.py index a0c39e04..f2825873 100644 --- a/alpaca_trade_api/stream2.py +++ b/alpaca_trade_api/stream2.py @@ -99,7 +99,7 @@ async def _ensure_ws(self): try: await self._connect() if self._streams: - await self.subscribe(self._streams) + await self.subscribe(list(self._streams)) break except websockets.WebSocketException as wse: logging.warn(wse)