Open
Description
Describe the bug
from polygon import RESTClient
from dataclasses import asdict
client = RESTClient()
date = "2025-06-12"
quotes = [asdict(q) for q in client.list_quotes("AAPL", limit=1)]
print(f"Number of quotes: {len(quotes)}")
will run infinitely because the next_url
will always be returned as part of the http response regardless of the limit and we will always iterate to the next page when the response contains next_url
To Reproduce
Expected behavior
This code currently runs infinitely.
Because the code always paginate when there's next_url
if "next_url" in decoded:
Screenshots
Additional context