feat: CTP 断线重连、下单卡片优化、手数自动计算
后台每 30s 检测并重连;以损定仓填止损后自动算手数;开仓/平仓按钮并排对齐。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ from position_sizing import (
|
||||
)
|
||||
from recommend_store import load_recommend_cache, refresh_recommend_cache
|
||||
from recommend_stream import recommend_hub, start_recommend_worker
|
||||
from ctp_reconnect import start_ctp_reconnect_worker
|
||||
from risk.account_risk_lib import (
|
||||
assert_can_open,
|
||||
get_risk_status,
|
||||
@@ -918,3 +919,4 @@ def install_trading(app, *, login_required, get_db, get_setting, set_setting, fe
|
||||
price_fn=_main_price,
|
||||
init_tables_fn=_init_tables,
|
||||
)
|
||||
start_ctp_reconnect_worker(get_mode_fn=lambda: get_trading_mode(get_setting))
|
||||
|
||||
Reference in New Issue
Block a user