Skip to content

"limit" parameter does not work with list_snapshot_options_chain #868

Open
@KarmicTrades

Description

@KarmicTrades

Describe the bug
list_snapshot_options_chain always seems to return all results, and not the limit. On the polygon.io test page, the limit parameter works, but not via this client.

To Reproduce
The code is simple, and should only return one result, but returns 312 for this example, no matter what you set "limit" to:

tickers = []

for o in client.list_snapshot_options_chain(
    underlying_asset = "SPY",
    params = {
    "expiration_date": "2025-04-07",
    "limit": 1
    }
):
    tickers.append(o)

print(len(tickers))

Expected behavior
A number of results equal to what I set "limit" parameter to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions