Limit tradable products to four varieties for accounts at or below 100k.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-27 23:18:27 +08:00
parent 24190bf679
commit 7bb80ba538
6 changed files with 113 additions and 9 deletions
+7 -1
View File
@@ -789,7 +789,13 @@ def logout():
@login_required
def api_symbol_search():
q = request.args.get("q", "")
return jsonify(search_symbols(q))
conn = get_db()
try:
from trading_context import get_account_capital
capital = get_account_capital(conn, get_setting)
finally:
conn.close()
return jsonify(search_symbols(q, capital=capital))
@app.route("/api/symbols/mains")