bifitnex-trading/memory/feedback_api_errors.md
kroutony 84093929d1 Backup Claude memory files to project repo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:23:22 +00:00

1.2 KiB
Raw Blame History

name description type
feedback_api_errors Bitfinex API 500 error patterns and fixes — stop ID staleness, min order size, balance locking feedback
  1. 止損 ID 過期導致 SELL 失敗step 2b 重掛止損後必須更新 stop_orders_by_sym,否則 step 10 SELL 時取消的是舊 ID真正的止損還在鎖餘額。 Why: ETH SELL 反覆 500 "not enough balance" 因為 available=0被止損鎖住How to apply: step 2b 掛新止損後立即更新 stop_orders_by_sym[sym]

  2. 小倉位不掛止損:低於 MIN_ORDER_AMOUNT 的殘留持倉(如 XRP 0.017 < 最低 4不能掛止損會被交易所拒絕。 Why: Bitfinex 500 "minimum size for XRPUST is 4"。 How to apply: main.py step 2b 和 trader.place_stop_loss_order 都檢查最低量。

  3. 報告排除小倉位_build_portfolio_one_lineramount < MIN_ORDER_AMOUNT 的持倉不計入持倉數和總值。 Why: 殘留微量幣(如賣出後剩 0.017 XRP不是真正的持倉。

  4. Cancel "Order not found" 不是錯誤:訂單可能已被觸發或過期,返回 True 即可。 Why: 避免 log 噪音和後續邏輯誤判。