Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sammchardy committed Feb 13, 2018
2 parents d95564d + 5e08147 commit 3cc7381
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions binance/client.py
Expand Up @@ -745,18 +745,18 @@ def get_historical_klines(self, symbol, interval, start_str, end_str=None):
# append this loops data to our output data
output_data += temp_data

# update our start timestamp using the last value in the array and add the interval timeframe
start_ts = temp_data[-1][0] + timeframe
else:
# it wasn't listed yet, increment our start date
start_ts += timeframe
# set our start timestamp using the last value in the array
start_ts = temp_data[-1][0]

idx += 1
# check if we received less than the required limit and exit the loop
if len(temp_data) < limit:
# exit the while loop
break

# increment next call by our timeframe
start_ts += timeframe

# sleep after every 3rd call to be kind to the API
if idx % 3 == 0:
time.sleep(1)
Expand Down

0 comments on commit 3cc7381

Please sign in to comment.