fix: remove price requirements for limit order

This commit is contained in:
2026-08-26 08:14:07 +08:00
parent 77d5f053f0
commit 5a9aeab38c
1 file changed
+1 -3
+1 -3
View File
@@ -99,7 +99,7 @@ class BotSpotTrade:
"""现货交易类""" """现货交易类"""
ORDER_TYPE_REQUIREMENTS = { ORDER_TYPE_REQUIREMENTS = {
"limit": ["quantity", "price", "quoteOrderQty"], "limit": ["quantity", "quoteOrderQty"],
"market": ["quantity", "quoteOrderQty"], "market": ["quantity", "quoteOrderQty"],
"convert": ["quoteOrderQty", "quantity"] "convert": ["quoteOrderQty", "quantity"]
} }
@@ -156,8 +156,6 @@ class BotSpotTrade:
return False, f"未知的订单类型: {order_type}" return False, f"未知的订单类型: {order_type}"
if order_type == "limit": if order_type == "limit":
if "price" not in params:
return False, "limit订单需要price参数"
if "quantity" not in params and "quoteOrderQty" not in params: if "quantity" not in params and "quoteOrderQty" not in params:
return False, "limit订单需要quantity或quoteOrderQty参数" return False, "limit订单需要quantity或quoteOrderQty参数"
return True, "" return True, ""