polygon-io / client-python

The official Python client library for the Polygon REST and WebSocket API.
https://polygon-api-client.readthedocs.io/
MIT License
800 stars 210 forks source link

RESTClient.list_ticker_news throws unexpected keywork when limit is used even though docs say limit should be supported #179

Closed pushshift closed 2 years ago

pushshift commented 2 years ago

Example:

client.list_ticker_news(ticker="INTC", limit=1000)

  File "/opt/polygon/./ingest.py", line 83, in <module>
    list_ticker_news("INTC")
  File "/opt/polygon/./ingest.py", line 75, in list_ticker_news
    news = client.list_ticker_news(ticker=ticker, limit=1000, raw=True)
TypeError: TickersClient.list_ticker_news() got an unexpected keyword argument 'limit'
tehcoderer commented 2 years ago

@pushshift try resp = client.list_ticker_news(ticker="INTC", params={"limit": 1000})

pushshift commented 2 years ago

Thanks! I did wind up using that and figured that would be the fallback. The impression from the docs though was that limit by itself could be used. Just wanted to give a heads up -- not a big deal but thought you might want to know.