Fix post-close auto sell: restore missing spot min-size helpers used by sim sell.
Sell was silently failing on ImportError; surface sell result in close alert notes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -178,6 +178,8 @@ def _sell_all_coin_to_usdt(cfg: dict[str, Any], underlying: str) -> dict[str, An
|
||||
from lib.options.options_spot_bridge_lib import spot_market_sell_coin_to_usdt
|
||||
|
||||
ex = cfg.get("exchange_options") or cfg.get("exchange")
|
||||
if callable(ex):
|
||||
ex = ex()
|
||||
if ex is None:
|
||||
return {"ok": False, "msg": "无交易所实例,跳过卖币"}
|
||||
return spot_market_sell_coin_to_usdt(ex, underlying=str(underlying or "ETH").upper())
|
||||
|
||||
Reference in New Issue
Block a user