Show realized trade PnL in Android app

This commit is contained in:
Codex
2026-06-29 21:06:51 +03:00
parent fe276d95ff
commit 9f47c04235
8 changed files with 227 additions and 10 deletions
+6 -1
View File
@@ -84,7 +84,12 @@ def create_app(settings: Settings | None = None) -> FastAPI:
@app.get("/api/trades")
async def trades(limit: int = 80) -> dict[str, Any]:
return {"items": storage.recent_trades(_limit(limit))}
row_limit = _limit(limit)
return {
"items": storage.recent_trades(row_limit),
"closed_items": storage.closed_trades(row_limit),
"closed_summary": storage.closed_trade_summary(),
}
@app.get("/api/signals")
async def signals(limit: int = 120) -> dict[str, Any]: