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:
dekun
2026-07-05 00:42:44 +08:00
parent efe7a57e60
commit 3a740235ac
13 changed files with 273 additions and 14 deletions
@@ -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(){