fix: remove price requirements for limit order
This commit is contained in:
1 file changed
+1
-3
@@ -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, ""
|
||||||
|
|||||||
Reference in New Issue
Block a user