Hide manual trade by default, block open while running, auto-refresh auth token.
Also fix flat-side reconcile to check both long and short residuals; document in 更新说明. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -44,6 +44,7 @@ KEYS = (
|
||||
"close_bid_mark_max_pct",
|
||||
"perp_qty_eth",
|
||||
"option_qty_eth",
|
||||
"show_manual_trade_buttons",
|
||||
)
|
||||
|
||||
|
||||
@@ -65,6 +66,7 @@ class StrategySettingsBody(BaseModel):
|
||||
close_bid_mark_max_pct: float | None = Field(default=None, ge=1, le=100)
|
||||
perp_qty_eth: float | None = Field(default=None, ge=0.01, le=100)
|
||||
option_qty_eth: float | None = Field(default=None, ge=0.01, le=100)
|
||||
show_manual_trade_buttons: bool | None = None
|
||||
exchange: str | None = Field(default=None, pattern="^(okx|binance|bn)$")
|
||||
|
||||
|
||||
@@ -139,6 +141,9 @@ def _read_settings() -> dict:
|
||||
"option_qty_eth": float(
|
||||
db.get_setting("option_qty_eth", str(s.option_qty_eth)) or s.option_qty_eth
|
||||
),
|
||||
"show_manual_trade_buttons": _as_bool(
|
||||
db.get_setting("show_manual_trade_buttons", "0"), False
|
||||
),
|
||||
"exchange": rt.exchange,
|
||||
"perp_inst_id": rt.perp_inst_id,
|
||||
"option_inst_family": rt.option_inst_family,
|
||||
|
||||
Reference in New Issue
Block a user