Apply 200k scope when CTP offline; trailing breakeven order UX.

When SimNow or live CTP is disconnected, default to the four-product whitelist regardless of reference capital. Trailing breakeven defaults off; when enabled hide take-profit and risk-reward, monitor exits via trailing stop only. Document both behaviors in TRADING.md and FEATURES.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-27 23:57:11 +08:00
parent 4f4c4bb9fc
commit e18d5feb72
12 changed files with 220 additions and 48 deletions
+3 -2
View File
@@ -791,11 +791,12 @@ def api_symbol_search():
q = request.args.get("q", "")
conn = get_db()
try:
from trading_context import get_account_capital
from trading_context import get_account_capital, is_ctp_connected
capital = get_account_capital(conn, get_setting)
ctp_connected = is_ctp_connected(get_setting)
finally:
conn.close()
return jsonify(search_symbols(q, capital=capital))
return jsonify(search_symbols(q, capital=capital, ctp_connected=ctp_connected))
@app.route("/api/symbols/mains")