Skip to content

Commit c63b6e3

Browse files
clickingbuttonsDarcy Linde
clickingbuttons
and
Darcy Linde
authored
add limit param to financials (#181)
* add limit param to financials * fix lint * add sort and order to list_ticker_news * add default values for list_tickers limit, order, and sort Co-authored-by: Darcy Linde <{[email protected]}>
1 parent 82a8a93 commit c63b6e3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

examples/rest/financials.py

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44

55
financials = client.get_ticker_details("NFLX")
66
print(financials)
7+
8+
for (i, n) in enumerate(client.list_ticker_news("INTC", limit=5)):
9+
print(i, n)
10+
if i == 5:
11+
break

polygon/rest/reference.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ def list_tickers(
7878
date: Optional[str] = None,
7979
active: Optional[bool] = None,
8080
search: Optional[str] = None,
81-
limit: Optional[int] = None,
82-
sort: Optional[Union[str, Sort]] = None,
83-
order: Optional[Union[str, Order]] = None,
81+
limit: Optional[int] = 10,
82+
sort: Optional[Union[str, Sort]] = "ticker",
83+
order: Optional[Union[str, Order]] = "asc",
8484
params: Optional[Dict[str, Any]] = None,
8585
raw: bool = False,
8686
) -> Union[Iterator[Ticker], HTTPResponse]:
@@ -154,6 +154,9 @@ def list_ticker_news(
154154
published_utc_lte: Optional[str] = None,
155155
published_utc_gt: Optional[str] = None,
156156
published_utc_gte: Optional[str] = None,
157+
limit: Optional[int] = None,
158+
sort: Optional[Union[str, Sort]] = None,
159+
order: Optional[Union[str, Order]] = None,
157160
params: Optional[Dict[str, Any]] = None,
158161
raw: bool = False,
159162
) -> Union[Iterator[TickerNews], HTTPResponse]:

0 commit comments

Comments
 (0)