diff --git a/tastytrade/account.py b/tastytrade/account.py index 55d7977..b2916d1 100644 --- a/tastytrade/account.py +++ b/tastytrade/account.py @@ -467,7 +467,7 @@ class Account(TastytradeJsonDataclass): is_firm_error: bool is_firm_proprietary: bool is_futures_approved: bool - is_test_drive: bool + is_test_drive: bool = False margin_or_cash: str is_foreign: bool created_at: datetime diff --git a/tastytrade/streamer.py b/tastytrade/streamer.py index 779476e..df048fc 100644 --- a/tastytrade/streamer.py +++ b/tastytrade/streamer.py @@ -499,6 +499,11 @@ async def _connect(self) -> None: logger.error(f"Streamer error: {message}") except ConnectionClosed as e: logger.error(f"Websocket connection closed with {e}") + if e.rcvd and e.rcvd.code == 1009: + logger.error( + "Subscription message too long! Try reducing the number of symbols." + ) + return except asyncio.CancelledError: logger.debug("Websocket interrupted, cancelling main loop.") return