永期手动下单:修币本位杠杆显示,张数定仓与双出场模式.

右侧以张数+比例算永续,杠杆取 env(BTC10/ETH5);开仓买币+5%滑点;出场可选盈利金额(扣双边费)或目标位;平仓后卖光币回 U.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 15:43:44 +08:00
parent e474c89c35
commit d68e9c3946
8 changed files with 392 additions and 63 deletions
+3
View File
@@ -87,6 +87,9 @@ def init_hedge_plan_tables(conn: sqlite3.Connection) -> None:
_ensure_column(conn, "hedge_plans", "option_moneyness", "TEXT")
_ensure_column(conn, "hedge_plans", "option_leverage", "REAL")
_ensure_column(conn, "hedge_plans", "perp_direction", "TEXT")
# 出场:profit=盈利金额(扣双边费);target=目标位点数
_ensure_column(conn, "hedge_plans", "exit_mode", "TEXT")
_ensure_column(conn, "hedge_plans", "profit_target_usdt", "REAL")
_ensure_column(conn, "hedge_plan_legs", "ct_mult", "REAL")