- Show realized P&L (USDT + %) in Slack for all SELL trades (TP, LLM, stop-loss)
- Detect filled stop-loss orders via stop_orders.json persistence and report as [止損觸發]
- Deduct 1 USDT margin from available balance to prevent exchange insufficient balance errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Includes: Bitfinex API integration, technical indicators,
LLM signal generation, risk management, Slack notifications.
Recent fixes:
- SELL orders use position value instead of total balance
- SELL signals always close full position
- Failed orders added to rejected list for Slack reporting
- Position/exposure limits auto-cap to remaining room
- BUY order minimum raised to 10% of portfolio
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>