You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
852 B
48 lines
852 B
# -*- coding: utf-8 -*-
|
|
"""
|
|
===================================
|
|
API v1 路由聚合
|
|
===================================
|
|
|
|
职责:
|
|
1. 聚合 v1 版本的所有 endpoint 路由
|
|
2. 统一添加 /api/v1 前缀
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from api.v1.endpoints import analysis, history, stocks, backtest, system_config
|
|
|
|
# 创建 v1 版本主路由
|
|
router = APIRouter(prefix="/api/v1")
|
|
|
|
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"]
|
|
)
|