Show position-limit freeze on hub and instance risk badges.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1533,6 +1533,7 @@ def get_db():
|
||||
|
||||
def hub_account_risk_status(conn):
|
||||
from account_risk_lib import (
|
||||
apply_position_limit_risk,
|
||||
compute_account_risk_status,
|
||||
enrich_risk_status_countdown,
|
||||
ensure_account_risk_schema,
|
||||
@@ -1546,7 +1547,12 @@ def hub_account_risk_status(conn):
|
||||
now=now,
|
||||
fmt_local_ms=ms_to_app_local_str,
|
||||
)
|
||||
return enrich_risk_status_countdown(st, now=now, daily_reset_hour=TRADING_DAY_RESET_HOUR)
|
||||
st = enrich_risk_status_countdown(st, now=now, daily_reset_hour=TRADING_DAY_RESET_HOUR)
|
||||
return apply_position_limit_risk(
|
||||
st,
|
||||
get_active_position_count(conn),
|
||||
max_active_positions=MAX_ACTIVE_POSITIONS,
|
||||
)
|
||||
|
||||
|
||||
def hub_user_initiated_close(
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<script src="/static/instance_theme.js?v=16"></script>
|
||||
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
|
||||
<link rel="stylesheet" href="/static/account_risk_badge.css?v=3">
|
||||
<script src="/static/account_risk_badge.js?v=3"></script>
|
||||
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
|
||||
<script src="/static/account_risk_badge.js?v=4"></script>
|
||||
|
||||
<meta name="theme-color" content="#0b0d14">
|
||||
<meta name="apple-mobile-web-app-title" content="监控">
|
||||
|
||||
Reference in New Issue
Block a user