- POST /api/backtest (create and start)
- GET /api/backtest (list)
- GET /api/backtest/{id} (detail)
- GET /api/backtest/{id}/equity-curve
- GET /api/backtest/{id}/holdings
- GET /api/backtest/{id}/transactions
- DELETE /api/backtest/{id}
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
813 B
Python
35 lines
813 B
Python
"""
|
|
Galaxy-PO Backend API
|
|
"""
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from app.api import auth_router, admin_router, portfolio_router, strategy_router, market_router, backtest_router
|
|
|
|
app = FastAPI(
|
|
title="Galaxy-PO API",
|
|
description="Quant Portfolio Management API",
|
|
version="0.1.0",
|
|
)
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["http://localhost:3000"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
# Include routers
|
|
app.include_router(auth_router)
|
|
app.include_router(admin_router)
|
|
app.include_router(portfolio_router)
|
|
app.include_router(strategy_router)
|
|
app.include_router(market_router)
|
|
app.include_router(backtest_router)
|
|
|
|
|
|
@app.get("/health")
|
|
async def health_check():
|
|
return {"status": "healthy"}
|