新增交易记录功能,支持开平仓和盈亏计算

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 10:46:27 +08:00
parent e222a93204
commit adec664c52
5 changed files with 307 additions and 2 deletions
+2 -1
View File
@@ -7,7 +7,7 @@ from starlette.middleware.base import BaseHTTPMiddleware
from app.database import engine, Base, SessionLocal
from app.models import User
from app.seed import seed
from app.routers import contracts, admin, auth, positions
from app.routers import contracts, admin, auth, positions, trades
TEMPLATES_DIR = Path(__file__).parent / "templates"
@@ -57,6 +57,7 @@ app.include_router(auth.router)
app.include_router(contracts.router)
app.include_router(admin.router)
app.include_router(positions.router)
app.include_router(trades.router)
@app.get("/")