From d5c57ba64d148ff1fdfb827d75ebc05a076a0c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80?= <78488229+viktor138irk@users.noreply.github.com> Date: Fri, 8 May 2026 04:08:36 +0900 Subject: [PATCH] Update project state after legacy bot transfer --- project.sw | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/project.sw b/project.sw index 1d369d8..79fcc82 100644 --- a/project.sw +++ b/project.sw @@ -8,27 +8,42 @@ Project goal: build a fast event-driven market research and trading assistant ba Current implementation status: - FastAPI backend in app/main.py - Demo account service in app/demo_account.py -- Database setup in app/db.py +- Database setup in app/db.py with safe schema patching for MVP migrations - SQLAlchemy models in app/models.py - Demo account is persisted in PostgreSQL - CoinEx public market-data client and live WebSocket stream in app/coinex.py - Monolithic AI bot logic in app/ai_bot.py -- Live dashboard in app/static/index.html +- Legacy trading bot service layer in app/legacy_bot.py +- Full admin dashboard in app/static/index.html - Dashboard renders live 1-minute candles from /ws/market/{market} -- Dashboard has simple Demo счет / Live счет mode switch in settings +- Dashboard has simple Demo счет / Live счет mode switch - Dockerfile, docker-compose.yml, requirements.txt, .env.example and .gitignore added - docker-compose includes api, postgres and redis services - README no longer exposes the server IP +Transferred from the adjacent 'торговый бот' chat context: +- SB Admin-like sidebar panel +- Dashboard KPI cards: balance, PNL, open trades, mode +- Trading page: open and closed trades tables +- Strategy/worker page with enable/disable buttons +- CoinEx settings page with access id and masked secret support +- Telegram settings page +- Updater status endpoint/page +- Terminal safe command endpoint/page +- Android-friendly status API +- Chart history model and snapshot endpoint support + Mode names: - demo: virtual demo account, simulated balance, simulated orders, PnL, trade history, reset balance - live: selected through bot settings with trade_mode=live Current bot endpoints: +- GET /api/v1/app/bootstrap - GET /api/v1/bot/settings - POST /api/v1/bot/settings?trade_mode=demo - POST /api/v1/bot/settings?trade_mode=live - GET /api/v1/bot/analyze?market=BTCUSDT +- GET /api/v1/bot/best-market - POST /api/v1/bot/decide?market=BTCUSDT - POST /api/v1/bot/auto-trade?market=BTCUSDT - POST /api/v1/bot/auto-demo-trade?market=BTCUSDT @@ -36,10 +51,23 @@ Current bot endpoints: - GET /api/v1/signals/recent - GET /api/v1/decisions/recent - GET /api/v1/dashboard/markers +- GET /api/v1/legacy/dashboard +- GET /api/v1/legacy/open-trades +- GET /api/v1/legacy/closed-trades +- GET /api/v1/legacy/chart-history +- GET /api/v1/legacy/strategies +- POST /api/v1/legacy/strategies/{strategy_id} +- GET /api/v1/legacy/coinex +- POST /api/v1/legacy/coinex +- POST /api/v1/legacy/telegram +- GET /api/v1/legacy/updater/status +- POST /api/v1/legacy/terminal +- GET /api/v1/android/status Important user preference: - Keep settings simple. - User wants a plain Demo / Live account switch. +- Do not show JSON on the main dashboard. - Do not add acknowledgement text or excessive confirmation flows in the UI. Current limitation: @@ -49,7 +77,7 @@ Current limitation: Next steps: 1. Implement final CoinEx live order adapter in a way accepted by the tool. -2. Add proper demo position accounting. +2. Add proper demo position accounting for open/closed trade tables. 3. Add RSS/news collector. 4. Add signal markers and equity curve. 5. Add tests and CI.