Add demo trading page, trader snapshot service and trading tables

Add trading_symbols, trading_analyses, trading_orders and trading_events.
The new trader service publishes account, position and open-order
snapshots of the Binance demo account to Redis every 3s. The /trading
page shows engine status, start/stop, balances, positions, the symbol
list with angle selection, open orders and the event timeline.
This commit is contained in:
eezd committed 2026-10-15 09:54:47 +08:00
1 parent 154fe2b687
commit 005943a54c
12 files changed
+1289 -3

No files matched your search

+2 -1
View File
@@ -2,7 +2,7 @@ from fastapi import Depends, FastAPI
from fastapi.openapi.docs import get_swagger_ui_html
from fastapi.responses import HTMLResponse
from alphapulse.api import auth, chat, crawler, market, news, settings, skills
from alphapulse.api import auth, chat, crawler, market, news, settings, skills, trading
from alphapulse.core.auth import require_admin
# 关闭默认文档路由,改为登录后才能访问
@@ -15,6 +15,7 @@ app.include_router(market.ws_router)
app.include_router(settings.router)
app.include_router(skills.router)
app.include_router(chat.router)
app.include_router(trading.router)
@app.get("/api/health", include_in_schema=False)