feat: 品种推荐与下单显示主力合约
推荐列表展示当前主力代码;下单品种支持中文/代码搜索并按交易所分组选择主力合约。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -29,11 +29,11 @@ def filter_affordable_recommendations(rows: list[dict]) -> list[dict]:
|
||||
def refresh_recommend_cache(
|
||||
conn,
|
||||
capital: float,
|
||||
price_fn: Callable[[str], Optional[float]],
|
||||
quote_fn: Callable[[str], Optional[dict]],
|
||||
) -> list[dict]:
|
||||
"""后台拉行情、筛选并写入数据库。"""
|
||||
ensure_recommend_tables(conn)
|
||||
all_rows = list_product_recommendations(capital, price_fn)
|
||||
all_rows = list_product_recommendations(capital, quote_fn)
|
||||
rows = filter_affordable_recommendations(all_rows)
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
conn.execute(
|
||||
|
||||
Reference in New Issue
Block a user