Remove USDC product path; CoinOX is coin-margined only.
Drop USDC open/quote/swap APIs and env knobs; retarget hedge/settings copy to USDT/coin. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -694,16 +694,16 @@
|
||||
}
|
||||
const line =
|
||||
label +
|
||||
" · 交易 USDC " +
|
||||
fmt(acct.trading_usdc, 2) +
|
||||
" · 资金 USDC " +
|
||||
fmt(acct.funding_usdc, 2);
|
||||
" · 交易 USDT " +
|
||||
fmt(acct.trading_usdt != null ? acct.trading_usdt : acct.trading_usdc, 2) +
|
||||
" · 资金 USDT " +
|
||||
fmt(acct.funding_usdt != null ? acct.funding_usdt : acct.funding_usdc, 2);
|
||||
const el = $("hp-opt-bal-line");
|
||||
if (el) el.textContent = line;
|
||||
const fundEl = $("hp-oo-funding-usdc");
|
||||
const tradeEl = $("hp-oo-trading-usdc");
|
||||
if (fundEl) fundEl.textContent = fmt(acct.funding_usdc, 2);
|
||||
if (tradeEl) tradeEl.textContent = fmt(acct.trading_usdc, 2);
|
||||
if (fundEl) fundEl.textContent = fmt(acct.funding_usdt != null ? acct.funding_usdt : acct.funding_usdc, 2);
|
||||
if (tradeEl) tradeEl.textContent = fmt(acct.trading_usdt != null ? acct.trading_usdt : acct.trading_usdc, 2);
|
||||
autoFillOoSheets();
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@
|
||||
const d = await apiJson("/api/options/transfer", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ ccy: "USDC", from: from, to: to, amount: amount }),
|
||||
body: JSON.stringify({ ccy: "USDT", from: from, to: to, amount: amount }),
|
||||
});
|
||||
if (!d.ok) {
|
||||
setOoXferMsg(d.msg || "划转失败", "err");
|
||||
@@ -1312,7 +1312,7 @@
|
||||
const ct = Number(state.selected.ct_mult || 0.01);
|
||||
const ask = Number(state.selected.ask || 0);
|
||||
const prem = ask * sheets * ct;
|
||||
line.textContent = "预估权利金 ≈ " + fmt(prem, 4) + " USDC(期权账户)";
|
||||
line.textContent = "预估权利金 ≈ " + fmt(prem, 4) + " 币(币本位)";
|
||||
}
|
||||
|
||||
function buildStraddleRows(contracts) {
|
||||
@@ -1561,7 +1561,7 @@
|
||||
fmt(b, 4) +
|
||||
" ≈ " +
|
||||
fmt(a + b, 4) +
|
||||
" USDC";
|
||||
" 币";
|
||||
}
|
||||
|
||||
function legPayload(c, sheets) {
|
||||
@@ -2051,7 +2051,7 @@
|
||||
}
|
||||
const amt = Math.floor(max * 100) / 100;
|
||||
const label = dir === "trading_to_funding" ? "交易 → 资金" : "资金 → 交易";
|
||||
if (!window.confirm("确认全部划转?\n方向:" + label + "\n数量:" + amt + " USDC")) return;
|
||||
if (!window.confirm("确认全部划转?\n方向:" + label + "\n数量:" + amt + " USDT")) return;
|
||||
const amtEl = $("hp-oo-xfer-amount");
|
||||
if (amtEl) {
|
||||
amtEl.removeAttribute("readonly");
|
||||
@@ -2435,7 +2435,7 @@
|
||||
html +=
|
||||
"<div><span class=\"muted\">权利金合计</span> " +
|
||||
fmt(p.premium_total, 4) +
|
||||
" USDC</div>";
|
||||
" 币</div>";
|
||||
html +=
|
||||
"<div><span class=\"muted\">合约摘要</span> <code>" +
|
||||
(d.contracts_summary || "—") +
|
||||
|
||||
Reference in New Issue
Block a user