mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
adding copy as a parameter to klines
This commit is contained in:
parent
215ded2e0a
commit
a45ec1ed1c
|
@ -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'):
|
||||
|
|
Loading…
Reference in New Issue
Block a user