This commit is contained in:
2026-08-29 00:44:41 +08:00
parent b72f99b4f8
commit 28e91366d6
11 changed files with 61 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ ORDER_TYPE_VOLUME, PR_TYPE_LATEST, QUICK_TRADE_NOW = 1101, 5, 2
class TradeMixin:
account_type: str
def passorder(self, op_type, stock, volume, order_type=0, pr_type=0, price=0, quick_trade=0, strategy_name=""):
def passorder(self, op_type, stock, volume, order_type=0, pr_type=0, price=0.0, quick_trade=0, strategy_name=""):
body = {"opType": op_type, "stock": stock, "price": price, "volume": volume}
for key, value in (("orderType", order_type), ("prType", pr_type), ("quickTrade", quick_trade), ("strategyName", strategy_name)):
if value: body[key] = value