Fix bug when exchange result is empty

This commit is contained in:
Matthias
2018-09-02 19:15:23 +02:00
parent ffd4469c1d
commit e9deb928f6
2 changed files with 22 additions and 3 deletions

View File

@@ -454,7 +454,8 @@ class Exchange(object):
data = sorted(data, key=lambda x: x[0])
# keeping last candle time as last refreshed time of the pair
self._pairs_last_refresh_time[pair] = data[-1][0] // 1000
if data:
self._pairs_last_refresh_time[pair] = data[-1][0] // 1000
# keeping candles in cache
self.klines[pair] = data