粉尘低于现货最小可卖量时忽略且不展示、不再重试卖回。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 11:16:13 +08:00
parent 80ef5ceccb
commit 030b237981
8 changed files with 183 additions and 19 deletions
+6 -1
View File
@@ -472,8 +472,13 @@ def _patch_spot_bridge_lib() -> None:
avail = fetch_trading_coin_available(ex, coin)
if avail is None or float(avail) <= 0:
return {"ok": False, "msg": f"交易账户无可用 {coin}"}
from lib.options.options_spot_bridge_lib import is_sellable_spot_coin, spot_min_sell_sz
if not is_sellable_spot_coin(ex, coin, avail):
min_sz = spot_min_sell_sz(ex, coin)
return {"ok": False, "msg": f"{coin} 可卖数量过小(低于现货最小 {min_sz:g})"}
sell_sz = max(0.0, float(avail) * 0.999)
if sell_sz <= 0:
if sell_sz <= 0 or not is_sellable_spot_coin(ex, coin, sell_sz):
return {"ok": False, "msg": f"{coin} 可卖数量过小"}
pub = _sim_public_exchange(ex)
if pub is None: