Skip to content

Commit adc6b2a

Browse files
Added limit param to indicators (#420)
1 parent f17881d commit adc6b2a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

polygon/rest/indicators.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def get_sma(
2828
adjusted: Optional[bool] = None,
2929
expand_underlying: Optional[bool] = None,
3030
order: Optional[Union[str, Order]] = None,
31+
limit: Optional[int] = None,
3132
params: Optional[Dict[str, Any]] = None,
3233
series_type: Optional[Union[str, SeriesType]] = None,
3334
raw: bool = False,
@@ -50,6 +51,7 @@ def get_sma(
5051
:param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response
5152
:param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top),
5253
desc will return results in descending order (newest at the top).The end of the aggregate time window
54+
:param limit: Limit the number of results returned, default is 10 and max is 5000
5355
:param params: Any additional query params
5456
:param series_type: The price in the aggregate which will be used to calculate the simple moving average
5557
i.e. 'close' will result in using close prices to calculate the simple moving average
@@ -81,6 +83,7 @@ def get_ema(
8183
adjusted: Optional[bool] = None,
8284
expand_underlying: Optional[bool] = None,
8385
order: Optional[Union[str, Order]] = None,
86+
limit: Optional[int] = None,
8487
params: Optional[Dict[str, Any]] = None,
8588
series_type: Optional[Union[str, SeriesType]] = None,
8689
raw: bool = False,
@@ -103,6 +106,7 @@ def get_ema(
103106
:param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response
104107
:param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top),
105108
desc will return results in descending order (newest at the top).The end of the aggregate time window
109+
:param limit: Limit the number of results returned, default is 10 and max is 5000
106110
:param params: Any additional query params
107111
:param series_type: The price in the aggregate which will be used to calculate the simple moving average
108112
i.e. 'close' will result in using close prices to calculate the simple moving average
@@ -134,6 +138,7 @@ def get_rsi(
134138
adjusted: Optional[bool] = None,
135139
expand_underlying: Optional[bool] = None,
136140
order: Optional[Union[str, Order]] = None,
141+
limit: Optional[int] = None,
137142
params: Optional[Dict[str, Any]] = None,
138143
series_type: Optional[Union[str, SeriesType]] = None,
139144
raw: bool = False,
@@ -156,6 +161,7 @@ def get_rsi(
156161
:param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response
157162
:param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top),
158163
desc will return results in descending order (newest at the top).The end of the aggregate time window
164+
:param limit: Limit the number of results returned, default is 10 and max is 5000
159165
:param params: Any additional query params
160166
:param series_type: The price in the aggregate which will be used to calculate the simple moving average
161167
i.e. 'close' will result in using close prices to calculate the simple moving average
@@ -189,6 +195,7 @@ def get_macd(
189195
adjusted: Optional[bool] = None,
190196
expand_underlying: Optional[bool] = None,
191197
order: Optional[Union[str, Order]] = None,
198+
limit: Optional[int] = None,
192199
params: Optional[Dict[str, Any]] = None,
193200
series_type: Optional[Union[str, SeriesType]] = None,
194201
raw: bool = False,
@@ -212,6 +219,7 @@ def get_macd(
212219
:param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response
213220
:param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top),
214221
desc will return results in descending order (newest at the top).The end of the aggregate time window
222+
:param limit: Limit the number of results returned, default is 10 and max is 5000
215223
:param params: Any additional query params
216224
:param series_type: The price in the aggregate which will be used to calculate the simple moving average
217225
i.e. 'close' will result in using close prices to calculate the simple moving average

0 commit comments

Comments
 (0)