修复主力合约识别:按持仓量判定并移除当月占位

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-15 18:28:51 +08:00
parent 404872007f
commit 9c0e5d9c57
4 changed files with 109 additions and 46 deletions
+2 -1
View File
@@ -17,7 +17,7 @@ from flask import (
)
from werkzeug.security import check_password_hash, generate_password_hash
from symbols import search_symbols, ths_to_codes, list_main_contracts_grouped
from symbols import search_symbols, ths_to_codes, list_main_contracts_grouped, refresh_main_index
from contract_specs import calc_position_metrics
from fee_specs import (
calc_fee_breakdown,
@@ -580,6 +580,7 @@ def start_background_threads():
target=lambda: kline_hub.worker_loop(DB_PATH, build_market_quote_payload),
daemon=True,
).start()
threading.Thread(target=refresh_main_index, daemon=True).start()
start_background_threads()