I first trialed Polygon’s websocket for the stocks cluster and was getting up to 80,000 quote ticks per second for Q.* (subscribe all US stock quotes). My understanding is that Alpaca’s API for live brokerage accounts permits/directs access to Polygon’s websocket. However, that doesn’t appear to be the case: with the Alpaca API / python SDK, I’m getting, at most, a few hundred quote tickers per second at peak volume. Moreover, Alpaca’s live brokerage key doesn’t work directly with Polygon’s websocket; it only authenticates through the Alpaca SDK interface to Polygon.
Is it correct that while the live brokerage account does connect to Polygon as opposed to IEX, it only offers a limited/free version of Polygon’s regular data provision? If so, it might be worth stating this more clearly in the Alpaca documentation, as that isn’t what it seems to indicate at present.
Kindly,
Jordan
My apologies: 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.
That said, while I was getting occasional disconnects from Alpaca, it might be worth including a note in the stream that the disconnect is due to a backlog of messages (Polygon mentions this in their documentation, albeit in a not obvious manner).
Hi there,
Thanks for the report and appreciate your experiences, it helps us understand where the confusion/pain is. Regarding Polygon, with the API key for the person who has the live trading account, you are supposed to get full volume of the data from Polygon, but honestly, unless you are sure you can handle the messsage volume, you should limit the universe to keep up to the speed.
Regarding the Alpaca websocket disconnection, we are discussing with a few active members who are helping us identify the issue, and we will work on the improvements and hopefully we can give you updates.
2 Likes