币本位顶栏去掉期权资金/交易列,交易账户显示USDT/ETH/BTC

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-20 12:58:43 +08:00
parent a84554e613
commit 73efad6fa5
9 changed files with 218 additions and 90 deletions
+3 -3
View File
@@ -152,14 +152,14 @@ class TestShowPerpFunds(unittest.TestCase):
os.environ["OKX_SHOW_PERP_FUNDS"] = old
def test_options_funding_label_usdc_only(self):
from lib.instance.instance_embed_context_lib import options_funding_label
from lib.instance.instance_embed_context_lib import options_funding_label, trading_account_label
self.assertEqual(options_funding_label(12.5, 99.0), "12.50 USDC")
self.assertEqual(options_funding_label(0.0, 50.0), "0.00 USDC")
self.assertEqual(options_funding_label(None, 10.0), "")
self.assertEqual(
options_funding_label(1.0, 20.0, 0.01, "coin", "ETH"),
"20.00 USDT / 0.01 ETH",
trading_account_label(20.0, 0.01, 0.001, margin_mode="coin"),
"20.00 USDT / 0.01 ETH / 0.001 BTC",
)