Skip to content

Commit efc2f5c

Browse files
authored
Set default limit=None for futures_historical_klines* (fetch full range by default) (sammchardy#1607)
* futures_historical_klines*: default limit=None; cleaned accidental secret-like string * trigger CI rerun
1 parent 1d67cc4 commit efc2f5c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

binance/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ async def futures_continuous_klines(self, **params):
17311731
return await self._request_futures_api("get", "continuousKlines", data=params)
17321732

17331733
async def futures_historical_klines(
1734-
self, symbol, interval, start_str, end_str=None, limit=500
1734+
self, symbol: str, interval: str, start_str, end_str=None, limit=None
17351735
):
17361736
return await self._historical_klines(
17371737
symbol,

binance/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7373,7 +7373,7 @@ def futures_continous_klines(self, **params):
73737373
return self._request_futures_api("get", "continuousKlines", data=params)
73747374

73757375
def futures_historical_klines(
7376-
self, symbol, interval, start_str, end_str=None, limit=500
7376+
self, symbol: str, interval :str, start_str, end_str=None, limit=None
73777377
):
73787378
"""Get historical futures klines from Binance
73797379

@@ -7385,7 +7385,7 @@ def futures_historical_klines(
73857385
:type start_str: str|int
73867386
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
73877387
:type end_str: str|int
7388-
:param limit: Default 500; max 1000.
7388+
:param limit: Default None (fetches full range in batches of max 1000 per request). To limit the number of rows, pass an integer.
73897389
:type limit: int
73907390

73917391
:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)
@@ -7401,7 +7401,7 @@ def futures_historical_klines(
74017401
)
74027402

74037403
def futures_historical_mark_price_klines(
7404-
self, symbol, interval, start_str, end_str=None, limit=500
7404+
self, symbol: str, interval: str, start_str, end_str=None, limit=None
74057405
):
74067406
"""Get historical futures mark price klines from Binance
74077407

@@ -7413,7 +7413,7 @@ def futures_historical_mark_price_klines(
74137413
:type start_str: str|int
74147414
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
74157415
:type end_str: str|int
7416-
:param limit: Default 500; max 1000.
7416+
:param limit: Default None (fetches full range in batches of max 1000 per request). To limit the number of rows, pass an integer.
74177417
:type limit: int
74187418

74197419
:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)

0 commit comments

Comments
 (0)