We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 722443d commit c592afeCopy full SHA for c592afe
alpaca_trade_api/stream2.py
@@ -31,8 +31,11 @@ async def _connect(self):
31
r = r.decode('utf-8')
32
msg = json.loads(r)
33
34
- if not 'data' in msg or msg['data']['status'] != 'authorized':
35
- raise ValueError("Invalid Alpaca API credentials, Failed to authenticate: {}".format(msg))
+ if 'data' not in msg or msg['data']['status'] != 'authorized':
+ raise ValueError(
36
+ ("Invalid Alpaca API credentials, Failed to authenticate: {}"
37
+ .format(msg))
38
+ )
39
40
self._ws = ws
41
await self._dispatch('authenticated', msg)
0 commit comments