粉尘低于现货最小可卖量时忽略且不展示、不再重试卖回。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -161,10 +161,18 @@ def trading_account_label(
|
||||
parts.append(f"{float(usdt):.2f} USDT")
|
||||
except (TypeError, ValueError):
|
||||
pass
|
||||
eth_txt = _fmt_coin_amount(eth, min_amt=1e-6)
|
||||
# 低于现货最小可卖的粉尘不展示(与卖回逻辑一致)
|
||||
try:
|
||||
from lib.options.options_spot_bridge_lib import spot_min_sell_sz
|
||||
|
||||
eth_min = spot_min_sell_sz(None, "ETH")
|
||||
btc_min = spot_min_sell_sz(None, "BTC")
|
||||
except Exception:
|
||||
eth_min, btc_min = 0.0001, 0.00001
|
||||
eth_txt = _fmt_coin_amount(eth, min_amt=eth_min)
|
||||
if eth_txt is not None:
|
||||
parts.append(f"{eth_txt} ETH")
|
||||
btc_txt = _fmt_coin_amount(btc, min_amt=1e-7)
|
||||
btc_txt = _fmt_coin_amount(btc, min_amt=btc_min)
|
||||
if btc_txt is not None:
|
||||
parts.append(f"{btc_txt} BTC")
|
||||
return "\n".join(parts) if parts else "—"
|
||||
|
||||
Reference in New Issue
Block a user