feat(strategy): 策略代码+实例路由组(routes_strategy)并注册 app [nas]

This commit is contained in:
2026-08-12 23:56:14 +08:00
parent 31836701f6
commit 1d8e39709f
3 changed files with 131 additions and 0 deletions
+2
View File
@@ -6,6 +6,7 @@ from .routes import router, set_orchestrator, set_auth_config
from .routes_paper import router as paper_router, set_db_path as set_paper_db_path
from .routes_live import router as live_router, set_db_path as set_live_db_path
from .routes_portfolio import router as portfolio_router
from .routes_strategy import router as strategy_router
from .auth import set_jwt_config
from .ws import manager
from sanguo_orchestrator.runner import Orchestrator
@@ -39,6 +40,7 @@ def create_app(db_path: str, file_dir=None, auth_config=None, max_workers: int =
app.include_router(paper_router, prefix="/api/v1")
app.include_router(live_router, prefix="/api/v1")
app.include_router(portfolio_router, prefix="/api/v1")
app.include_router(strategy_router, prefix="/api/v1")
set_paper_db_path(db_path)
set_live_db_path(db_path)