Show expiry settlement as index vs strike intrinsic.
Persist settle_index_px and surface formula in trade detail so expiry closes are not mistaken for book fills. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -52,10 +52,18 @@ export function positionSidesZh(
|
||||
return `${sideZh(perp)}/${sideZh(option)}`;
|
||||
}
|
||||
|
||||
export function fillDescZh(leg: string, action: string, side: string): string {
|
||||
export function fillDescZh(
|
||||
leg: string,
|
||||
action: string,
|
||||
side: string,
|
||||
closeReason?: string | null,
|
||||
): string {
|
||||
const l = LEG_ZH[leg] || leg;
|
||||
const a = ACTION_ZH[action] || action;
|
||||
const s = SIDE_ZH[side] || side;
|
||||
if (leg === "option" && action === "close" && closeReason === "expiry") {
|
||||
return "期权到期结算";
|
||||
}
|
||||
// 期权买入开仓:「期权开多」;永续:「永续开多/开空」
|
||||
if (leg === "option" && action === "open") return "期权开多";
|
||||
if (leg === "option" && action === "close") return "期权平多";
|
||||
|
||||
Reference in New Issue
Block a user