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 3f0cc8b commit 910a874Copy full SHA for 910a874
polygon/websocket/__init__.py
@@ -90,9 +90,13 @@ async def connect(
90
if self.verbose:
91
print("authing:")
92
await s.send(json.dumps({"action": "auth", "params": self.api_key}))
93
- msg = await s.recv()
+ auth_msg = await s.recv()
94
+ auth_msg_parsed = json.loads(auth_msg)
95
- print("authed:", msg)
96
+ print("authed:", auth_msg)
97
+ if auth_msg_parsed[0]["status"] == "auth_failed":
98
+ print(auth_msg_parsed[0]["message"])
99
+ return
100
while True:
101
if self.schedule_resub:
102
0 commit comments