feat: 币种输入旁实时显示交易所现价
Shared SymbolLivePrice polls /api/order_defaults on input with debounce; wired to trade, key monitor, trend, and key focus forms. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1155,7 +1155,10 @@ function refreshAccountSnapshot(){
|
||||
const orderSymbolEl = document.getElementById("order-symbol");
|
||||
const orderDirectionEl = document.getElementById("order-direction");
|
||||
const fullMarginEl = document.getElementById("use-full-margin");
|
||||
if(orderSymbolEl) orderSymbolEl.addEventListener("change", refreshOrderDefaults);
|
||||
if(orderSymbolEl) {
|
||||
orderSymbolEl.addEventListener("change", refreshOrderDefaults);
|
||||
orderSymbolEl.addEventListener("input", refreshOrderDefaults);
|
||||
}
|
||||
if(orderDirectionEl) orderDirectionEl.addEventListener("change", refreshOrderDefaults);
|
||||
if(fullMarginEl){
|
||||
fullMarginEl.addEventListener("change", function(){
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
<label style="display:flex;align-items:center;gap:4px;font-size:.82rem;color:#cfd3ef">
|
||||
<input type="checkbox" name="order_chart" value="true"> 开仓后生成多周期K线图(各周期100根,含开平仓标记)
|
||||
</label>
|
||||
<span style="display:flex;align-items:center;padding:0 10px;font-size:.8rem;color:#8fc8ff">成交价自动取交易所实时+成交回报</span>
|
||||
{% from 'symbol_live_price_snippet.html' import symbol_live_price_hint %}
|
||||
{{ symbol_live_price_hint('order-symbol-live-price', 'order-symbol', 'order-direction') }}
|
||||
<span class="symbol-live-price-note">下单成交价以交易所成交回报为准</span>
|
||||
<input id="order-sl" name="sl" step="any" placeholder="止损价格" required>
|
||||
<input id="order-fixed-rr" name="fixed_rr" type="number" min="0.01" step="0.01" placeholder="盈亏比(默认1.5)" value="1.5" title="止盈距离=止损距离×盈亏比">
|
||||
<span id="order-tp-preview" style="display:none;font-size:.8rem;color:#8fc8ff;align-self:center">预估止盈:—</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
|
||||
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
|
||||
<link rel="stylesheet" href="/static/instance_page.css?v=2">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=49">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=50">
|
||||
<script src="/static/account_risk_badge.js?v=4"></script>
|
||||
<meta name="theme-color" content="#0b0d14">
|
||||
<title>{{ exchange_display }} · 加密货币 | 交易监控复盘系统</title>
|
||||
@@ -121,6 +121,7 @@
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
<script src="/static/form_submit_guard.js?v=2"></script>
|
||||
<script src="/static/manual_order_rr_preview.js?v=5"></script>
|
||||
<script src="/static/symbol_live_price.js?v=1"></script>
|
||||
<script src="/static/strategy_roll.js?v=6"></script>
|
||||
<script src="/static/key_monitor_form.js?v=2"></script>
|
||||
{% include 'embed_boot_scripts.html' %}
|
||||
|
||||
Reference in New Issue
Block a user