- Fix realized_pnl always being 0 on SELL (use amount*price instead of amount_usdt)
- Add debug logging for all-HOLD LLM cycles (log sample HOLD reasons)
- Fix nonce collision in Bitfinex API auth (add counter)
- Fix timezone to UTC+8 in main, trade_logger, sync_cost_basis, check_errors
- Fix stop-loss retry with longer delay after cancel
- Add min order amount check in trader before BUY
- Fix risk_manager to skip positions with amount <= 0
- Cap trade_history to 500 entries to prevent unbounded growth
- Fix greedy regex in LLM response parser
- Reset cost_tracking start dates to null
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- check_errors.py: on errors, call Claude CLI to diagnose and attempt auto-fix,
include fix report in Slack alert
- slack_notifier.py: show "LLM 分析失敗" when LLM fails instead of "All HOLD"
- main.py: track llm_ok flag and pass to Slack reporter
- setup.sh: restore ~/.local/bin in crontab PATH for claude CLI
- llm_analyzer.py: use shutil.which for robust claude binary lookup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New check_errors.py: scans last 1 hour of logs, sends Slack @channel only on errors
- Add to system crontab (every 5 min)
- Update setup.sh to include check_errors.py in crontab setup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>