粉尘低于现货最小可卖量时忽略且不展示、不再重试卖回。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1546,11 +1546,21 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
|
||||
open_bridges = list_open_bridges(conn_b)
|
||||
bal = cfg["fetch_options_balances"](ex, scope="main")
|
||||
bridge = open_bridges[0] if open_bridges else None
|
||||
from lib.options.options_spot_bridge_lib import (
|
||||
display_sellable_coin,
|
||||
spot_min_sell_sz,
|
||||
)
|
||||
|
||||
raw_eth = bal.get("trading_eth_avail") or bal.get("trading_eth")
|
||||
raw_btc = bal.get("trading_btc_avail") or bal.get("trading_btc")
|
||||
spot_sell_hint = {
|
||||
"bridge_status": str(bridge.get("status") or "") if bridge else None,
|
||||
"bridge_underlying": str(bridge.get("underlying") or "").upper() if bridge else None,
|
||||
"trading_eth": bal.get("trading_eth_avail") or bal.get("trading_eth"),
|
||||
"trading_btc": bal.get("trading_btc_avail") or bal.get("trading_btc"),
|
||||
# 粉尘归零:不够现货最小可卖则前端不展示、不提示重试
|
||||
"trading_eth": display_sellable_coin(ex, "ETH", raw_eth),
|
||||
"trading_btc": display_sellable_coin(ex, "BTC", raw_btc),
|
||||
"min_sz_eth": spot_min_sell_sz(ex, "ETH"),
|
||||
"min_sz_btc": spot_min_sell_sz(ex, "BTC"),
|
||||
"default_underly": (cfg.get("default_underly") or "ETH").strip().upper(),
|
||||
}
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user