Use 100k equity for recommend list when CTP is offline.
When SimNow or live CTP is disconnected, the tradable-products section shows four whitelisted symbols and calculates max lots from a fixed 100,000 capital instead of reference capital in settings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -811,16 +811,16 @@ def api_symbols_recommended():
|
||||
"""品种下拉:仅展示当前资金下可开仓品种(与下方可开仓品种表一致)。"""
|
||||
from recommend_store import recommend_payload
|
||||
from trading_context import (
|
||||
get_account_capital,
|
||||
get_fixed_lots,
|
||||
get_max_margin_pct,
|
||||
get_recommend_capital,
|
||||
get_sizing_mode,
|
||||
get_trading_mode,
|
||||
)
|
||||
|
||||
conn = get_db()
|
||||
try:
|
||||
capital = get_account_capital(conn, get_setting)
|
||||
capital = get_recommend_capital(conn, get_setting)
|
||||
payload = recommend_payload(
|
||||
conn,
|
||||
live_capital=capital,
|
||||
|
||||
Reference in New Issue
Block a user