I’m not sure if this is actually working as expected, although it is working to an extent. As expected is that the data stream is identical to the regular Polygon websocket, but my experience so far (having started a trial with Polygon directly and using their websocket, and using the Alpaca live brokerage API now) is that the Alpaca websocket data stream is reduced relative to a direct connection to Polygon. This might explain why the url you surfaced includes “alpaca” and the regular does not (i.e. wss://alpaca.socket.polygon.io/stocks vs. wss://socket.polygon.io); Alpaca appears to have modified access, possibly related to the licensing for free use in brokerage accounts. I’m just speculating; if I’m wrong, my apologies.
I suspect Alpaca is getting access per user at a significantly discounted rate. Polygon is possibly limiting the throughput of connections coming through Alpaca. If other limits and conditions apply to Alpaca web sockets it would be good to have that more explicitly documented.
As it turns out, this was not an error on Alpaca’s side. At the same time that I switched from direct Polygon access to Alpaca, I also switched SQL versions. The slow down was a database issue on my end.