Rename 永期「市价下单」文案为「手动下单」(卖一限价,非交易所市价单).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 15:24:05 +08:00
parent c9e69ce8ef
commit e474c89c35
3 changed files with 22 additions and 22 deletions
@@ -267,7 +267,7 @@ def validate_option_primary_moneyness(
m_want = (moneyness or "atm").strip().lower()
m_got = classify_moneyness(opt_type=o, strike=k, index_px=s)
if m_want in ("all", "any", ""):
# 市价人工选约:不限制虚实值
# 手动选约:不限制虚实值
pass
elif m_want == "itm":
if not is_itm_or_atm(opt_type=o, strike=k, index_px=s):
@@ -283,7 +283,7 @@ def validate_option_primary_moneyness(
else:
return "期权类型(实/平/虚)无效"
# 间隔/最短到期/杠杆门槛:仅条件单使用;传 0 表示市价下单跳过
# 间隔/最短到期/杠杆门槛:仅条件单使用;传 0 表示手动下单跳过
interval_raw = _sf(strike_interval)
if interval_raw is None:
interval_raw = DEFAULT_STRIKE_INTERVAL
@@ -390,7 +390,7 @@ def validate_option_primary_start(body: dict[str, Any]) -> Optional[str]:
want = opt_type_for_view(direction)
if opt_type != want:
return f"以期权为主时做{'多' if direction == 'long' else '空'}须用 {'Call' if want == 'C' else 'Put'}"
# 市价下单:左侧人工选约,跳过条件单(间隔/最短到期/杠杆门槛)
# 手动下单:左侧人工选约,跳过条件单(间隔/最短到期/杠杆门槛)
if market:
return None
moneyness = str(body.get("moneyness") or body.get("option_moneyness") or "otm").strip().lower()