期权页增加重试卖回ETH按钮,平仓后可手动全额卖回交易户标的币
币本位模式下持仓区显示重试按钮与可用余额提示,调用已有 spot-bridge 接口按交易账户全部可用量市价卖回 USDT。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -442,6 +442,19 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
|
||||
payload["coin_budget"] = coin_budget_preview(cfg, ex)
|
||||
except Exception as e:
|
||||
payload["coin_budget"] = {"ok": False, "msg": str(e)}
|
||||
conn = cfg["get_db"]()
|
||||
try:
|
||||
init_options_tables(conn)
|
||||
from lib.options.options_spot_bridge_lib import list_open_bridges
|
||||
|
||||
open_bridges = list_open_bridges(conn)
|
||||
if open_bridges:
|
||||
payload["bridge_status"] = str(open_bridges[0].get("status") or "")
|
||||
payload["bridge_underlying"] = str(open_bridges[0].get("underlying") or "")
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
conn.close()
|
||||
return jsonify(payload)
|
||||
|
||||
@app.route("/api/options/chain")
|
||||
|
||||
Reference in New Issue
Block a user