mirror of
https://github.com/ZhuLinsen/daily_stock_analysis
synced 2026-09-20 10:53:33 +08:00
* feat: add data capability contract * fix(review-feedback-2289): preserve unknown status until availability is checked and Make * fix(review-feedback-2289): Aggregate daily quality across supported markets and add kline * fix(review-feedback-2289): Honor daily-source circuit breakers in quality selection and Make * fix(review-feedback-2289): Scope market-overview quality by market and Do not select a news * fix: align data capability with runtime routes * fix: align data capability runtime coverage * fix: align source and index capability routes * fix: preserve runtime capability uncertainty * fix: include US index capability routes * fix: align realtime and monitor capabilities * fix: remove unsupported Tushare index capability * fix: align capabilities with runtime routes * fix: model realtime and breaker routes * fix: align US realtime request priority * fix: align realtime circuit coverage * fix: filter unavailable daily priorities * fix: align US realtime capability claims * fix: align executable US data routes
124 lines
1.9 KiB
Python
124 lines
1.9 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
===================================
|
|
API v1 路由聚合
|
|
===================================
|
|
|
|
职责:
|
|
1. 聚合 v1 版本的所有 endpoint 路由
|
|
2. 统一添加 /api/v1 前缀
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from api.v1.endpoints import (
|
|
agent,
|
|
alerts,
|
|
screening,
|
|
analysis,
|
|
auth,
|
|
backtest,
|
|
data,
|
|
decision_signals,
|
|
health,
|
|
history,
|
|
intelligence,
|
|
portfolio,
|
|
stocks,
|
|
system_config,
|
|
usage,
|
|
)
|
|
|
|
# 创建 v1 版本主路由。
|
|
# /api/v1 前缀在 api.app 挂载,避免新版 FastAPI 误判子路由 "" 为 empty path。
|
|
router = APIRouter()
|
|
|
|
router.include_router(
|
|
auth.router,
|
|
prefix="/auth",
|
|
tags=["Auth"]
|
|
)
|
|
|
|
router.include_router(
|
|
agent.router,
|
|
prefix="/agent",
|
|
tags=["Agent"]
|
|
)
|
|
|
|
router.include_router(
|
|
analysis.router,
|
|
prefix="/analysis",
|
|
tags=["Analysis"]
|
|
)
|
|
|
|
router.include_router(
|
|
history.router,
|
|
prefix="/history",
|
|
tags=["History"]
|
|
)
|
|
|
|
router.include_router(
|
|
stocks.router,
|
|
prefix="/stocks",
|
|
tags=["Stocks"]
|
|
)
|
|
|
|
router.include_router(
|
|
backtest.router,
|
|
prefix="/backtest",
|
|
tags=["Backtest"]
|
|
)
|
|
|
|
router.include_router(
|
|
system_config.router,
|
|
prefix="/system",
|
|
tags=["SystemConfig"]
|
|
)
|
|
|
|
router.include_router(
|
|
usage.router,
|
|
prefix="/usage",
|
|
tags=["Usage"]
|
|
)
|
|
|
|
router.include_router(
|
|
portfolio.router,
|
|
prefix="/portfolio",
|
|
tags=["Portfolio"]
|
|
)
|
|
|
|
router.include_router(
|
|
alerts.router,
|
|
prefix="/alerts",
|
|
tags=["Alerts"]
|
|
)
|
|
|
|
router.include_router(
|
|
decision_signals.router,
|
|
prefix="/decision-signals",
|
|
tags=["DecisionSignals"]
|
|
)
|
|
|
|
router.include_router(
|
|
screening.router,
|
|
prefix="/screening",
|
|
tags=["Screening"]
|
|
)
|
|
|
|
router.include_router(
|
|
data.router,
|
|
prefix="/data",
|
|
tags=["Data"]
|
|
)
|
|
|
|
router.include_router(
|
|
intelligence.router,
|
|
prefix="/intelligence",
|
|
tags=["Intelligence"]
|
|
)
|
|
|
|
router.include_router(
|
|
health.router,
|
|
tags=["Health"]
|
|
)
|