massive-com / massive-com/client-python
list_tickers() sorting behavior doesn't match documentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 362
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at RESTClient.list_tickers and the linked Reference documentation, then reproduce the search="THC" example from the issue. Check whether the returned ordering comes from the API or the client, and consider the documented relevance ordering resolved only when the observed behavior and documentation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100