From f2b6ff910f975beca136311816117bc79dc0a93f Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 15 Aug 2022 20:05:22 +0200 Subject: [PATCH] Accept wrong pair in get_precision_amount --- freqtrade/exchange/exchange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index cb1e5405a..8605e984a 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -685,14 +685,14 @@ class Exchange: Returns the amount precision of the exchange. :param pair: """ - return self.markets[pair].get('precision', {}).get('amount', None) + return self.markets.get(pair, {}).get('precision', {}).get('amount', None) def get_precision_price(self, pair: str) -> Optional[float]: """ Returns the price precision of the exchange. :param pair: """ - return self.markets[pair].get('precision', {}).get('price', None) + return self.markets.get(pair, {}).get('precision', {}).get('price', None) def amount_to_precision(self, pair: str, amount: float) -> float: """