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 14d6c9c commit 48463adCopy full SHA for 48463ad
alpaca_trade_api/stream.py
@@ -64,7 +64,11 @@ def __init__(self,
64
async def _connect(self):
65
self._ws = await websockets.connect(
66
self._endpoint,
67
- extra_headers={'Content-Type': 'application/msgpack'})
+ extra_headers={'Content-Type': 'application/msgpack'},
68
+ ping_interval=10,
69
+ ping_timeout=180,
70
+ max_queue=1024,
71
+ )
72
r = await self._ws.recv()
73
msg = msgpack.unpackb(r)
74
if msg[0]['T'] != 'success' or msg[0]['msg'] != 'connected':
0 commit comments