18 Commits

Author SHA1 Message Date
dekun b6acbf4b2c fix(risk): trigger cooldown only on user-initiated closes
Remove external-close risk hooks; register user_instance, user_hub, and user_trend_stop via hub API and trend stop; update docs and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 19:14:05 +08:00
dekun e307eef690 feat(risk): add account cooldown and daily freeze after manual/external close
Implements shared account_risk_lib with 4h/1h cooloff and daily freeze rules, wires hooks into all four exchange apps and hub monitor UI, with tests and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 17:05:19 +08:00
dekun 24a86a710c feat: add per-account daily open hard limit across all exchanges
Enforce optional DAILY_OPEN_HARD_LIMIT in precheck_risk and can_trade, keep AI alerts at DAILY_OPEN_ALERT_THRESHOLD, and document env setup for all four instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 15:46:18 +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 b1952dcd6e fix(binance): read funding balance from wallet/balance API
Prefer sapi asset/wallet/balance Funding USDT (matches App), merge get-funding-asset and ccxt as fallbacks, and add optional BINANCE_FUNDING_INCLUDE_SPOT plus a richer verify script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 07:12:28 +08:00
dekun 1b0bd41e3b 关键位箱体突破调整 2026-05-23 18:06:06 +08:00
dekun ada9478713 修复web前端,增加openai 2026-05-23 11:53:36 +08:00
dekun 46f73fce43 中控增加下单,关键位,系统设置 2026-05-22 10:04:28 +08:00
dekun 2cddce92a0 关键位监控 2026-05-21 06:26:07 +08:00
dekun 90cb9abf31 删除同步仓位 2026-05-19 18:49:55 +08:00
dekun a95ee401bc 修复币安交易记录 2026-05-19 18:25:21 +08:00
dekun c365a89c47 修复币安交易记录 2026-05-19 18:04:33 +08:00
dekun e4ea51d45c 修复币安交易记录 2026-05-19 17:58:32 +08:00
dekun bded31a7e7 增加备份 2026-05-17 09:28:18 +08:00
dekun ff62666c4d 前端面板修改 2026-05-17 08:42:50 +08:00
dekun eb32ec70b5 修正env 2026-05-16 23:39:37 +08:00