Skip to content

list_tickers() sorting behavior doesn't match documentation #899

@shahar-arbor

Description

@shahar-arbor

Describe the bug

The documentation of the Python lib. states that if the "search" argument is given, list_tickers' results would be sorted by relevance:

https://polygon-api-client.readthedocs.io/en/latest/Reference.html#polygon.RESTClient.list_tickers

but it doesn't seem to be the case.

when using the example i included below, results are sorted by ticker.

To Reproduce
`from polygon import RESTClient

client = RESTClient("api-key")

tickers = []

for t in client.list_tickers(market="stocks", search="THC", limit=10,):
tickers.append(t)

print(tickers)
`

Expected behavior
I would have liked the results to be sorted by relevance to the search term.

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