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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user