+
+
交易所
+
{s.exchange || "—"}
+
+
+
交易日
+
{s.trading_day}
+
+
+
总交易
+
{s.total_trades}
+
+
+
胜率
+
+ {(s.win_rate * 100).toFixed(0)}%
+
+
+
+
盈亏比
+
+ {s.profit_loss_ratio != null ? s.profit_loss_ratio.toFixed(2) : "—"}
+
+
+
+
总资金
+
{fmtU(s.total_funds)}
+
+
+
资金账户
+
{fmtU(s.funding_usdt)}
+
+
+
交易账户
+
{fmtU(s.trading_usdt)}
+
+
+
期权资金账户
+
{s.options_funding_label}
+
+
+
期权交易账户
+
{s.options_trading_label}
+
+
+
实时盈亏
+
+ {s.realtime_pnl == null ? "—" : fmtU(s.realtime_pnl)}
+
+
+
+ );
+}
diff --git a/frontend/src/pages/Plan.tsx b/frontend/src/pages/Plan.tsx
index 8377d0c..040f39a 100644
--- a/frontend/src/pages/Plan.tsx
+++ b/frontend/src/pages/Plan.tsx
@@ -168,8 +168,7 @@ export default function PlanPage() {
自动对冲计划
- {plan?.mode === "LIVE" ? "LIVE 实盘下单" : "SIM 本地撮合"} · 行情{" "}
- {(snap?.exchange || "okx").toUpperCase()}
+ 行情 {(snap?.exchange || "okx").toUpperCase()}
{snap?.perp_inst_id ? ` · ${snap.perp_inst_id}` : ""} ·
目标平仓(双腿/远虚只平永续) · 未达标则到期结算
{plan?.mode === "LIVE" && plan.live_ready === false
diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx
index d10bea8..88f5307 100644
--- a/frontend/src/pages/Settings.tsx
+++ b/frontend/src/pages/Settings.tsx
@@ -12,7 +12,7 @@ import {
uploadRestoreBackup,
} from "../api/client";
-type Tab = "strategy" | "runtime" | "account" | "backup";
+type Tab = "strategy" | "runtime" | "funds" | "account" | "backup";
type StratSub =
| "position"
| "select"
@@ -104,6 +104,18 @@ export default function SettingsPage() {
const [restoreFile, setRestoreFile] = useState(null);
const [restorePhrase, setRestorePhrase] = useState("");
+ const [fundsOk, setFundsOk] = useState("");
+ const [fundsErr, setFundsErr] = useState("");
+ const [convertDir, setConvertDir] = useState<"usdt_to_usdc" | "usdc_to_usdt">(
+ "usdt_to_usdc",
+ );
+ const [convertAmt, setConvertAmt] = useState(100);
+ const [xferCcy, setXferCcy] = useState<"USDT" | "USDC">("USDC");
+ const [xferAmt, setXferAmt] = useState(50);
+ const [xferFrom, setXferFrom] = useState("funding");
+ const [xferTo, setXferTo] = useState("trading");
+ const [usdcRate, setUsdcRate] = useState(null);
+
function loadRuntime() {
apiFetch("/api/settings/runtime")
.then((r) => {
@@ -426,6 +438,20 @@ export default function SettingsPage() {
>
运行模式
+