From 0aec641f4cdda57b2b2695001a8db0fbbaf2f4fd Mon Sep 17 00:00:00 2001 From: kieran-mackle Date: Sat, 23 Mar 2024 09:34:46 +1000 Subject: [PATCH] fix(ccxt): type conversion of order limits check --- autotrader/brokers/ccxt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autotrader/brokers/ccxt.py b/autotrader/brokers/ccxt.py index 437fed74..327a632e 100644 --- a/autotrader/brokers/ccxt.py +++ b/autotrader/brokers/ccxt.py @@ -84,7 +84,7 @@ def place_order(self, order: Order, **kwargs) -> None: # Check order meets limits limits: dict = self.api.markets.get(order.instrument, {}).get("limits", {}) if limits.get("amount") is not None: - if order.size < limits["amount"]["min"]: + if float(order.size) < float(limits["amount"]["min"]): # Order too small self._logger.warning(f"Order below minimum size: {order}") return None