Move fee_methods to exchange
This commit is contained in:
		| @@ -1162,30 +1162,6 @@ class FreqtradeBot: | ||||
|  | ||||
|         return False | ||||
|  | ||||
|     def _order_has_fee(self, order: Dict) -> bool: | ||||
|         """ | ||||
|         Verifies if the passed in order dict has the needed keys to extract fees, | ||||
|         and that these keys (currency, cost) are not empty. | ||||
|         :param order: Order or trade (one trade) dict | ||||
|         :return: True if the fee substructure contains currency and cost, false otherwise | ||||
|         """ | ||||
|         if not isinstance(order, dict): | ||||
|             return False | ||||
|         return ('fee' in order and order['fee'] is not None | ||||
|                 and (order['fee'].keys() >= {'currency', 'cost'}) | ||||
|                 and order['fee']['currency'] is not None | ||||
|                 and order['fee']['cost'] is not None | ||||
|                 ) | ||||
|  | ||||
|     def _extract_cost_curr_rate(self, order: Dict) -> Tuple[float, str, float]: | ||||
|         """ | ||||
|         :param order: Order or trade (one trade) dict | ||||
|         :return: Tuple with cost, currency, rate of the given fee dict | ||||
|         """ | ||||
|         return (order['fee']['cost'], | ||||
|                 order['fee']['currency'], | ||||
|                 order['fee'].get('rate', None)) | ||||
|  | ||||
|     def get_real_amount(self, trade: Trade, order: Dict, order_amount: float = None) -> float: | ||||
|         """ | ||||
|         Get real amount for the trade | ||||
|   | ||||
		Reference in New Issue
	
	Block a user