diff --git a/tastytrade/streamer.py b/tastytrade/streamer.py index 8630a18..e992a9e 100644 --- a/tastytrade/streamer.py +++ b/tastytrade/streamer.py @@ -691,7 +691,9 @@ async def _connect(self) -> None: self._heartbeat_task = \ asyncio.create_task(self._heartbeat()) elif message['type'] == 'CHANNEL_OPENED': - self._subscription_state[message['channel']] \ + channel = next((k for k, v in self._channels.items() + if v == message['channel'])) + self._subscription_state[channel] \ = message['type'] elif message['type'] == 'FEED_CONFIG': pass