-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
⚠️ Before submitting: Please check the Troubleshooting Guide (中文版) to see if your issue can be resolved quickly.
🐛 Bug Description
The PnL calculation in the information sent to the AI doesn't match the position PnL information on the exchange.
🔍 Bug Category
Other: The aggregated data to AI prompt is not delivering accurate PnL, the values sent to LLM differs from the values seen on the exchange.
📋 Steps to Reproduce
- Watch the bot create a trade
- Wait position close for PnL on the next run
- PnL prompt is not accurate with exchange data.
✅ Expected Behavior
PnL should be accurate and authoritative source of truth must be exchange data. (Aster tested)
❌ Actual Behavior
The PnL delivered to LLM does not match the exchange position PnL.
📸 Screenshots & Logs
- NoFX prompt sent to LLM
- Actual exchange position info
📊 Additional Context
Frequency:
-
Happens every time
-
Other: The LLM doesn't recieve accurate PnL data.
💡 Possible Solution
Make exchange data the authoritative source of truth for positions PnL
📝 Quick Tips for Faster Resolution
For Trading Issues:
- ✅ Check Binance position mode: Go to Futures → ⚙️ Preferences → Position Mode → Must be Hedge Mode
- ✅ Verify API permissions: Futures trading must be enabled
- ✅ Check decision logs in
decision_logs/{trader_id}/for AI reasoning
For Connection Issues:
4. ✅ Test API connectivity: curl http://localhost:8080/api/health
5. ✅ Check API rate limits on exchange
6. ✅ Verify API keys are not expired
For UI Issues:
7. ✅ Hard refresh: Ctrl+Shift+R (or Cmd+Shift+R on Mac)
8. ✅ Check browser console (F12) for errors
9. ✅ Verify backend is running: docker compose ps or ps aux | grep nofx