Hide zero USDT in options balance labels and add swap/transfer all buttons.
Skip 0 balances in header display; fill max funding/trading amount on 全部兑换/全部划转. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -280,7 +280,8 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
|
||||
ex, err = _require_options_ex(cfg)
|
||||
if ex is None:
|
||||
return jsonify({"ok": False, "msg": err})
|
||||
bal = cfg["fetch_options_balances"](ex)
|
||||
force = (request.args.get("force") or "").strip().lower() in ("1", "true", "yes")
|
||||
bal = cfg["fetch_options_balances"](ex, force=force)
|
||||
return jsonify({"ok": True, **bal, "trade_budget": cfg["trade_budget"]})
|
||||
|
||||
@app.route("/api/options/chain")
|
||||
|
||||
Reference in New Issue
Block a user