I’m seeing quite a few stream disconnection recently when I use Polygon Streamconn. It seems like it won’t reconnect automatically. I see the debug message below:
Hi,
v0.50.1 is adding extended debug information for ws connectivity so it might help you understand what is going on.
just make sure you define your python logger so you will see the logs.
Hi, someone offered a solution for a similar issue, might help you too.
it’s when using polygon and when having an exception and closing the websocket.
could you install his branch locally and check if that solves your issue?
do it like this: pip install git+https://github.com/drew-wallace/alpaca-trade-api-python@sockets-fix
Getting same 1006 no reason disconnect issues with polygon steam on minute data. Happens randomly. Is there an example python code to catch a disconnect and re-establish websocket connection to polygon stream?
Have alpaca live broker account and using alpaca-trade-api