Skip to content

Polygon websockets reconnects; Polygon v2 aggregates limit parameter

Compare
Choose a tag to compare
@ttt733 ttt733 released this 11 Jul 03:21
· 694 commits to master since this release

In this release, we add some basic code for handling automatic reconnection when the Polygon channel closes unexpectedly. The maximum number of reconnection attempts and the delay before a reconnect is attempted can be configured the same way they are configured for the REST API - set the APCA_RETRY_MAX and APCA_RETRY_WAIT environment variables to specify these values. Note that this code handles reconnection only for failures that occur after the channel has been opened - if an unexpected closure occurs during the opening of the channel or the authentication to it, an automatic reconnection will not be attempted. We will try to address this in a future release.

Also of note is the addition of a limit parameter to Polygon's historic aggregate API calls. This parameter was previously undocumented in the Polygon API docs, however, we have received confirmation that it is officially supported. You can now specify a maximum number of results you wish to receive when querying their historic aggregate API call.

Please also note that with this release, support for Python 3.5 is ended, as a dependency (the websockets library) supports Python>=3.6. Please upgrade your Python version if necessary.