adding copy as a parameter to klines

This commit is contained in:
misagh 2018-12-21 10:20:01 +01:00
parent 215ded2e0a
commit a45ec1ed1c

View File

@ -158,17 +158,12 @@ class Exchange(object):
"""exchange ccxt id"""
return self._api.id
def klines(self, pair: str) -> DataFrame:
def klines(self, pair: str, copy=True) -> DataFrame:
if pair in self._klines:
return self._klines[pair].copy()
else:
return None
def last_kline_close(self, pair: str):
if pair in self._klines:
return self._klines[pair].iloc[-1]['close']
else:
return None
def set_sandbox(self, api, exchange_config: dict, name: str):
if exchange_config.get('sandbox'):