Add weekend open skip, expiry force-close, and Chinese trade labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 10:28:33 +08:00
parent 826362b556
commit b50c134f5b
19 changed files with 525 additions and 52 deletions
+13 -4
View File
@@ -1,5 +1,11 @@
import { useEffect, useState } from "react";
import { apiFetch } from "../api/client";
import {
closeReasonZh,
fillDescZh,
positionSidesZh,
statusZh,
} from "../labels";
type Group = {
group_id: string;
@@ -62,10 +68,12 @@ export default function TradesPage() {
onClick={() => openGroup(g.group_id)}
>
<span className="mono">
{g.group_id} · {g.status} · {g.perp_side}/{g.option_side}
{g.group_id} · {statusZh(g.status)} ·{" "}
{positionSidesZh(g.perp_side, g.option_side)}
</span>
<span className="mono">
PnL {Number(g.realized_pnl || 0).toFixed(2)} · {g.close_reason || ""}
{Number(g.realized_pnl || 0).toFixed(2)} ·{" "}
{closeReasonZh(g.close_reason)}
</span>
</div>
))
@@ -77,10 +85,11 @@ export default function TradesPage() {
{fills.map((f) => (
<div key={f.id} className="kv">
<span className="mono">
{f.leg} {f.action} {f.side}
{fillDescZh(f.leg, f.action, f.side)}
</span>
<span className="mono">
px {f.fill_px.toFixed(4)} · qty {f.qty_eth} · fee {f.fee.toFixed(4)}
{f.fill_px.toFixed(4)} · {f.qty_eth} · {" "}
{f.fee.toFixed(4)}
</span>
</div>
))}