Commit Graph

38 Commits

Author SHA1 Message Date
root
7ebdb98643 feat: store and serve indicators per strategy
- signal_indicators table: added strategy column
- Each strategy gets its own row per cycle
- API /api/signals/latest?strategy=v51_baseline|v52_8signals
- API /api/signals/signal-history?strategy=...
- V5.1 page reads v51_baseline data, V5.2 reads v52_8signals
- Now V5.1 and V5.2 show truly independent scores
2026-03-02 02:52:17 +00:00
root
e405a9c21e fix: parse factors JSON string in /api/signals/latest
psycopg2 writes factors as JSON string, asyncpg reads it back as string
instead of dict. Parse it before returning to frontend.
2026-03-02 00:44:36 +00:00
root
01b1992643 feat: save factors to signal_indicators + show FR/Liq on signals page
- DB: added factors JSONB column to signal_indicators
- Backend: save_indicator now includes factors JSON
- API: /api/signals/latest returns factors field
- Frontend: signals page shows FR and 清算 score bars
2026-03-01 23:57:55 +00:00
root
a9c3523a24 feat: independent strategy paper trading controls
- Each strategy has its own position count (max 4 each)
- paper_config.enabled_strategies: per-strategy toggle
- is_strategy_enabled() checks both master switch and strategy list
- API: /api/paper/config now supports enabled_strategies array
- Config auto-loads on API startup

Usage: POST /api/paper/config {enabled_strategies: ['v52_8signals']}
2026-03-01 12:43:46 +00:00
root
778cf8cce1 feat: V5.2 frontend differentiation - strategy tabs, side-by-side scores, visual badges
- Paper page: prominent strategy tabs (全部/V5.1/V5.2) at top
- Paper trades: strategy column with color-coded badges (blue=V5.1, green=V5.2)
- Paper positions: FR/Liq scores displayed prominently for V5.2
- Signals page: side-by-side V5.1 vs V5.2 score comparison cards
- Signals page title updated to 'V5.1 vs V5.2'
- New API endpoint for strategy comparison data
- Layout: local font fallback for build stability
2026-03-01 12:21:19 +00:00
root
f6156a2cfe Add strategy-aware paper trade schema and API endpoints 2026-03-01 11:55:00 +00:00
root
77d38c7269 fix: add total_pnl to stats API top-level response 2026-03-01 01:42:39 +00:00
root
bda42e669a feat: stats panel with per-symbol tabs (ALL/BTC/ETH/XRP/SOL) - full stats for each coin 2026-03-01 01:37:02 +00:00
root
d0e626a437 feat: paper summary add balance + pnl_usdt 2026-02-28 12:00:19 +00:00
root
d177d28498 fix: paper positions use Binance realtime price instead of signal_indicators 2026-02-28 11:49:49 +00:00
root
f90df6f3b5 feat: paper positions show real-time price + unrealized PnL (R + USDT) 2026-02-28 11:40:11 +00:00
root
b232270948 fix: add Request import 2026-02-28 11:20:05 +00:00
root
cd17c76000 fix: remove duplicate return causing IndentationError in main.py 2026-02-28 11:19:01 +00:00
root
282aed138a feat: paper trading switch + config API + max positions limit 2026-02-28 11:13:39 +00:00
root
e054db112d feat: paper trading - backend (table+signal_engine integration+5 APIs) + frontend page 2026-02-28 11:10:28 +00:00
root
0ac2225979 feat: add XRP and SOL symbols (4 coins total) 2026-02-28 10:11:05 +00:00
root
ec6a8fc64d fix: rename signal-history API to avoid route conflict + restart backfill 2026-02-28 06:22:32 +00:00
root
424cb993f8 feat: signal history list + always compute scoring even without signal 2026-02-28 06:09:32 +00:00
root
2e969f68b4 fix: parse JSONB string from asyncpg + frontend parseVal fallback 2026-02-28 05:49:42 +00:00
root
7ca843ca70 fix: revert signals/latest API to explicit column query (to_jsonb broke field names) 2026-02-28 05:45:21 +00:00
root
340d8eb3a1 feat: V5.1 frontend - 5-layer scoring display + market indicators panel 2026-02-28 05:33:40 +00:00
root
748f6f57a5 perf: server/status接口优化(cpu非阻塞+pm2直接调用+COUNT估算+5秒缓存) 2026-02-27 18:46:56 +00:00
root
930c8d3a9c feat: 服务器监控面板(/server) - CPU/内存/硬盘/PM2进程/PG数据库/回补状态 2026-02-27 17:30:41 +00:00
root
61287657df perf: trades/summary聚合下推PG(SQL GROUP BY替代Python循环) + trades/latest加2秒缓存 2026-02-27 16:52:35 +00:00
root
4168c1dd88 refactor: SQLite→PostgreSQL migration - db.py连接层 + main/collector/signal-engine/backfill全部改PG
Phase 1: 核心数据表(agg_trades/rate_snapshots/signal*)迁PG
auth.py暂保留SQLite(低频,不影响性能)
- db.py: psycopg2同步池 + asyncpg异步池 + PG schema + 分区管理
- main.py: 全部改asyncpg查询
- collector: psycopg2 + execute_values批量写入
- signal-engine: psycopg2同步读写
- backfill: psycopg2 + ON CONFLICT DO NOTHING
2026-02-27 16:15:16 +00:00
root
547f093352 feat: V5 signal-engine + API endpoints for indicators/latest/trades 2026-02-27 15:31:12 +00:00
root
bb187167bb feat: add LiveTradesCard - real-time agg trades display + /api/trades/latest endpoint 2026-02-27 11:35:55 +00:00
root
7e38b24fa8 feat: V3.0 aggTrades collector - WS+REST补洞+巡检+按月分表+查询API 2026-02-27 11:29:16 +00:00
root
1ab228286c feat: V2.0 auth system - JWT access/refresh, invite codes, route protection, admin CLI, auth gate blur overlay 2026-02-27 11:08:57 +00:00
root
11667d4faa feat: add YTD annualized rate to RateCard 2026-02-27 10:08:22 +00:00
root
362c1f1e16 fix: add /api/signals/history endpoint 2026-02-27 08:54:13 +00:00
root
32e9dd3531 feat: rate kline unit x10000 (bps), default interval 1h 2026-02-27 07:56:07 +00:00
root
80c4ea67e7 fix: add background snapshot loop - collect every 2s regardless of frontend 2026-02-27 07:04:41 +00:00
root
072592145f feat: kline page with lightweight-charts + /api/kline OHLC aggregation endpoint 2026-02-27 06:36:19 +00:00
root
8efa6ede32 feat: rate_snapshots 2s persistent storage + /live realtime chart page 2026-02-27 05:47:26 +00:00
root
03218dce04 fix: split rate/stats refresh intervals, rates 2s stats 2min 2026-02-26 13:57:39 +00:00
root
42e329cc55 fix: add cache to prevent Binance rate limit (rates 3s, history/stats 60s) 2026-02-26 13:54:59 +00:00
root
44e07eabb2 feat: arbitrage engine Phase 0 scaffold - FastAPI + Next.js 2026-02-26 12:06:10 +00:00