fix(place_order): quoteOrderQty and quantity appear together in LIMIT orders

This commit is contained in:
2025-07-17 22:26:15 +08:00
parent bfb88af302
commit cbecb3703f

View File

@@ -320,6 +320,7 @@ class MexcSpotTrade:
price = float(processed_kwargs["price"]) price = float(processed_kwargs["price"])
quantity = quote_amount / price quantity = quote_amount / price
processed_kwargs["quantity"] = str(quantity) processed_kwargs["quantity"] = str(quantity)
processed_kwargs.pop("quoteOrderQty")
logger.info("根据quoteOrderQty计算quantity: %f", quantity) logger.info("根据quoteOrderQty计算quantity: %f", quantity)
except (ValueError, KeyError) as e: except (ValueError, KeyError) as e:
logger.error("计算quantity失败: %s", str(e)) logger.error("计算quantity失败: %s", str(e))