adding copy as a parameter to klines
This commit is contained in:
		| @@ -158,17 +158,12 @@ class Exchange(object): | |||||||
|         """exchange ccxt id""" |         """exchange ccxt id""" | ||||||
|         return self._api.id |         return self._api.id | ||||||
|  |  | ||||||
|     def klines(self, pair: str) -> DataFrame: |     def klines(self, pair: str, copy=True) -> DataFrame: | ||||||
|         if pair in self._klines: |         if pair in self._klines: | ||||||
|             return self._klines[pair].copy() |             return self._klines[pair].copy() | ||||||
|         else: |         else: | ||||||
|             return None |             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): |     def set_sandbox(self, api, exchange_config: dict, name: str): | ||||||
|         if exchange_config.get('sandbox'): |         if exchange_config.get('sandbox'): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user