You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #865#868 and #886. I noticed it when using list_ticker_news and this change fixed it for my news use case.
This implementation should retain the current behaviour unless the user explicitly passes a limit, in which case it is respected. It will paginate until the limit is satisfied.
Hey @rian-dolphin, thanks again for submitting the PR and highlighting this across multiple issues. After reviewing the broader set of use cases (including your list_ticker_news example), as discussed we decided to take a slightly different approach by adding a top-level pagination flag to the RESTClient. This allows users to explicitly disable auto-pagination when needed, while keeping the default behavior unchanged.
With pagination=True (the default), the client continues to fetch all pages, treating limit as the page size. If you set pagination=False, the client stops after the first page and enforces limit as a strict cap on the number of results.
This will return exactly 3 results — no extra pages fetched. The fix is available in v1.15.0, just run pip install -U polygon-api-client� to get the latest release, and we’ve updated the README with more details on how this flag works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #865 #868 and #886. I noticed it when using list_ticker_news and this change fixed it for my news use case.
This implementation should retain the current behaviour unless the user explicitly passes a limit, in which case it is respected. It will paginate until the limit is satisfied.