Rename 永期「市价下单」文案为「手动下单」(卖一限价,非交易所市价单).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
|
||||
<div id="hp-tab-perp_options" class="hp-tab-panel" role="tabpanel">
|
||||
<div class="options-dual-grid" id="hp-po-layout">
|
||||
<!-- 左:市价选约(与期权下单同风格,人工选) -->
|
||||
<!-- 左:手动选约(与期权下单同风格,人工选;开仓按卖一限价) -->
|
||||
<div class="card hp-po-left-card hp-po-select-card">
|
||||
<div class="hp-po-left-stack">
|
||||
<div class="hp-po-inner-card hp-opt-card">
|
||||
<h2>市价选约 · <span id="hp-opt-type-label">Call</span> <span class="muted hp-acct-tag" id="hp-opt-acct-tag">币本位</span></h2>
|
||||
<h2>手动选约 · <span id="hp-opt-type-label">Call</span> <span class="muted hp-acct-tag" id="hp-opt-acct-tag">币本位</span></h2>
|
||||
<div class="form-row hp-opt-toolbar hp-po-opt-toolbar options-chain-toolbar">
|
||||
<button type="button" class="btn-secondary hp-uly-btn active" data-uly="ETH">ETH</button>
|
||||
<button type="button" class="btn-secondary hp-uly-btn" data-uly="BTC">BTC</button>
|
||||
@@ -73,8 +73,8 @@
|
||||
<button type="button" class="btn-secondary" id="hp-load-chain">刷新链</button>
|
||||
<span id="hp-index-line" class="hp-po-index" aria-live="polite">指数 —</span>
|
||||
</div>
|
||||
<p class="muted hp-po-chain-hint" id="hp-po-pair-hint">买 Call + 永续空 · 点「选择」填入右侧市价下单;比例默认 2(期权 1 → 永续 0.5)。</p>
|
||||
{# 条件单残留字段:隐藏,市价下单不用 #}
|
||||
<p class="muted hp-po-chain-hint" id="hp-po-pair-hint">买 Call + 永续空 · 点「选择」填入右侧手动下单;比例默认 2(期权 1 → 永续 0.5)。</p>
|
||||
{# 条件单残留字段:隐藏,手动下单不用 #}
|
||||
<input type="hidden" id="hp-min-hours" value="0" />
|
||||
<input type="hidden" id="hp-strike-interval" value="0" />
|
||||
<input type="hidden" id="hp-opt-leverage" value="0" />
|
||||
@@ -106,10 +106,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右:市价下单参数(无选约条件;条件单另议) -->
|
||||
<!-- 右:手动下单参数(无选约条件;条件单另议;开仓按盘口卖一限价,非交易所市价单) -->
|
||||
<div class="card hp-po-right-card hp-po-order-card">
|
||||
<h2>
|
||||
<span id="hp-po-mode-badge" class="hp-po-mode-badge">市价下单</span>
|
||||
<span id="hp-po-mode-badge" class="hp-po-mode-badge">手动下单</span>
|
||||
<span id="hp-po-card-title">下单</span>
|
||||
· <span id="hp-perp-uly-label">ETH</span>
|
||||
<span class="muted hp-acct-tag" id="hp-perp-acct-tag">合约账户</span>
|
||||
@@ -117,7 +117,7 @@
|
||||
<details class="tip-collapse hp-rule-collapse">
|
||||
<summary class="tip-collapse-summary">规则说明</summary>
|
||||
<div class="tip-collapse-body rule-tip">
|
||||
<p><strong>市价下单</strong>:左侧人工选约(同期权页:到期/Call·Put/实虚值),点「选择」后右侧下单;非条件盯盘。</p>
|
||||
<p><strong>手动下单</strong>:左侧人工选约(同期权页:到期/Call·Put/实虚值),点「选择」后右侧下单;开仓按<strong>卖一限价</strong>(非交易所市价单);非条件盯盘。</p>
|
||||
<p><strong>组合</strong>:买 Call → 永续空;买 Put → 永续多。</p>
|
||||
<p><strong>比例</strong>:期权:永续默认 <strong>2</strong>(期权名义 ÷ 比例 = 永续名义)。例:期权 1 BTC → 永续 0.5 BTC。</p>
|
||||
</div>
|
||||
@@ -186,7 +186,7 @@
|
||||
</div>
|
||||
<div class="form-row hp-action-row hp-po-action-row">
|
||||
<span id="hp-po-strategy-status" class="hp-po-strategy-status" aria-live="polite"></span>
|
||||
<button type="button" class="primary" id="hp-preview-btn" title="按左侧已选合约市价开仓(期权+永续)">市价下单</button>
|
||||
<button type="button" class="primary" id="hp-preview-btn" title="按左侧已选合约卖一限价开仓(期权+永续)">手动下单</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user