177 Commits

Author SHA1 Message Date
dekun 3fb2023efb feat: strategy trade snapshots, DCA detail, and hub trend layout
Persist ended trend pullback and roll group snapshots to a unified records page; show replenishment tiers on instance and hub cards with horizontal single-position layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:45:27 +08:00
dekun 1a6b5f55a1 fix: regenerate clean app icons with Pillow (fix corrupted favicon)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:22:08 +08:00
dekun e03cce20d6 feat: add brand icons for Chrome shortcuts and PWA manifest
Dark cyan-green candlestick icon for hub and four exchanges; generate/sync scripts and docs/shortcut-icon.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:17:22 +08:00
dekun 29b0634c6d feat: bidirectional daily auto-transfer with position skip
Rebalance swap to AUTO_TRANSFER_AMOUNT at Beijing hour: top up from funding or sweep excess back. Skip and WeChat notify when active positions exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 09:57:25 +08:00
dekun f7bac11694 feat: add full-margin position sizing mode across four exchanges
Env POSITION_SIZING_MODE switches risk vs full-margin (available*buffer, BTC/ETH 10x). Blocks trend/roll/key auto opens in full margin, purges breakout/fib monitors with WeChat notice, keeps RR check and initial SL snapshot for records.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 08:24:35 +08:00
dekun d75527a9ca docs(env): unify auto-transfer config across four exchanges
Align .env.example blocks and add sync script to merge AUTO_TRANSFER_* into existing instance .env files without touching API secrets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 07:47:18 +08:00
dekun 1b3f661bad fix: label trend breakeven handoff as 趋势回调 across four exchanges
Set order monitor and trade record source to trend pullback after handoff; unify hub and instance display; add migration script for legacy rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 06:30:14 +08:00
dekun d07357b98e fix(hub): merge mark price from Flask snapshot and fix board refresh
Sync hub positions with instance price_snapshot (order_prices and position_marks).
Fix monitor board UI when hub restarts (version rewind) and queue snapshot fetches.
Expose board aggregate status on /api/ping for diagnostics.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 22:44:01 +08:00
dekun fac28c402b fix(okx): use OCO algo orders for hub TP/SL to avoid instant close
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 21:00:22 +08:00
dekun e2bf58cfd3 feat(trend): 趋势回调保本移交下单监控并统一写交易记录
保本后结束趋势计划,持仓转入下单监控(备注趋势回调),交易所同时挂保本止损与计划止盈;中控或交易所平仓均经下单监控写入交易记录(trend_plan_id、开仓类型),四所共用 strategy_trend_register。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 17:01:34 +08:00
dekun cf3e2ee1c9 feat: 持仓快照盈亏比与交易所止损已保本标识
盈亏比固定用开仓 initial_stop_loss 计算,人工改委托后不变化;轮询交易所止损触发价相对成交价判定已保本,四所实例与中控统一显示绿色标识。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 16:31:03 +08:00
dekun e265c1b31a feat(okx): auto-open on box/convergence key breakout like Gate/Binance
Replace alert-only check_key_monitors with market open flow, add _market_open_for_key_monitor, and update docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 16:08:32 +08:00
dekun a5f4ad8e97 fix(okx): show negative unrealized PnL on strategy page
Parse signed upl/unrealizedPnl from CCXT positions and fall back to calc_pnl when exchange metrics are missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 16:02:24 +08:00
dekun ba681c7a58 中控行情区与 K 线本地库(15 天滚动、按需拉取)
新增行情区单图与周期切换,K 线优先读 hub_kline.db,不足时经各实例 /api/hub/ohlcv 补齐;无后台定时更新。含回滚标签说明与单元测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 10:58:59 +08:00
dekun ef99fb6c2e 修复支撑阻力企业微信重复 2026-06-02 06:55:57 +08:00
dekun 9115523df7 修复中控 2026-05-30 12:33:20 +08:00
dekun c882a5e565 修复中控 2026-05-30 12:13:33 +08:00
dekun acbd9576bc 中控 2026-05-30 12:08:56 +08:00
dekun 4c4af4a464 修复okx 趋势回调 2026-05-30 10:13:22 +08:00
dekun 5cf4b9eea6 修复okx 趋势回调 2026-05-30 10:10:34 +08:00
dekun 8501f7fe0e 修复okx 趋势回调 2026-05-30 10:06:54 +08:00
dekun 9678cd54ce 修复okx 趋势回调 2026-05-30 09:43:50 +08:00
dekun 81f27765ca 修复趋势回调顺势加仓的交易记录 2026-05-29 18:39:40 +08:00
dekun 0b1b5d7672 修复交易记录bug 2026-05-28 22:47:18 +08:00
dekun 33042890b5 修复滚仓 2026-05-28 14:43:15 +08:00
dekun a1b3b5d478 修复滚仓 2026-05-28 13:27:02 +08:00
dekun aa92952b2d 移除一键保本bug 2026-05-28 12:43:55 +08:00
dekun 96dd4a041c 增加一键保本 2026-05-28 12:31:16 +08:00
dekun 6184e7a11f okx 2026-05-28 12:11:02 +08:00
dekun b2b6aac094 修改支撑阻力的企业微信推送 2026-05-28 11:54:37 +08:00
dekun a829cf50f3 修改 2026-05-27 22:42:32 +08:00
dekun fe068709ac 修改 2026-05-27 22:35:51 +08:00
dekun bb8aca0cb3 修改 2026-05-27 16:32:30 +08:00
dekun b9af1f69fe 修复ai 2026-05-27 16:13:23 +08:00
dekun 6ca94ef416 修改 2026-05-27 16:05:10 +08:00
dekun e6c2b73e2c 修改 2026-05-27 15:57:43 +08:00
dekun 7aed70db04 修改 2026-05-27 15:52:00 +08:00
dekun 6093bf6b94 修改 2026-05-27 15:32:46 +08:00
dekun 7bb3f942ed 修改 2026-05-27 15:22:40 +08:00
dekun ffb83c0526 okx修复下单记录显示 2026-05-27 13:19:41 +08:00
dekun 2dcd443157 更新okx关键位跳转 2026-05-27 08:23:20 +08:00
dekun 3c461a8068 修改okx推送 2026-05-27 06:49:12 +08:00
dekun b26647060e 修改okx交易记录 2026-05-27 06:24:53 +08:00
dekun 480e5b1d20 修改okx挂单 2026-05-27 06:02:19 +08:00
dekun 4e8498f736 修复okx止盈止损 2026-05-25 11:14:20 +08:00
dekun dccd490a46 修复gate盈亏比 2026-05-25 11:07:47 +08:00
dekun 80cc26ef27 修复okx 2026-05-25 07:21:29 +08:00
dekun 1a21295646 修复okx 2026-05-24 10:29:37 +08:00
dekun 134173be24 修复okx 2026-05-24 10:24:33 +08:00
dekun 77a0861801 修复okx 2026-05-24 10:14:13 +08:00