Accept wrong pair in get_precision_amount

This commit is contained in:
Matthias 2022-08-15 20:05:22 +02:00
parent e6af9a6903
commit f2b6ff910f

View File

@ -685,14 +685,14 @@ class Exchange:
Returns the amount precision of the exchange. Returns the amount precision of the exchange.
:param pair: :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]: def get_precision_price(self, pair: str) -> Optional[float]:
""" """
Returns the price precision of the exchange. Returns the price precision of the exchange.
:param pair: :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: def amount_to_precision(self, pair: str, amount: float) -> float:
""" """