From 45c97fde2dc125f00255f197f5bbf4fe63a20a06 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 30 Apr 2020 22:16:52 +0200 Subject: [PATCH] Use correct typehint for extract_cost_curr_rate --- freqtrade/exchange/exchange.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index bd6d617c0..df7f3005e 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1085,7 +1085,7 @@ class Exchange: ) @staticmethod - def extract_cost_curr_rate(order: Dict) -> Tuple[float, str, float]: + def extract_cost_curr_rate(order: Dict) -> Tuple[float, str, Optional[float]]: """ Extract tuple of cost, currency, rate. Requires order_has_fee to run first! @@ -1095,6 +1095,7 @@ class Exchange: return (order['fee']['cost'], order['fee']['currency'], order['fee'].get('rate', None)) + # calculate rate ? (order['fee']['cost'] / (order['amount'] * order['price'])) def is_exchange_bad(exchange_name: str) -> bool: