Files
trading_bot_v3/app/api
mindesbunister 16e0ed9e5f fix: resolve SL/TP order placement and orphaned cleanup issues
- Fixed Drift SDK initialization in place-order endpoint (NodeWallet vs Wallet)
- Added 2% minimum trigger distance validation in execute-drift endpoint
- Corrected orphaned order cleanup logic to cancel ALL orders when no position
- Resolved issue where SL/TP orders were immediately canceled due to insufficient distance
- Tested complete cycle: position entry → protective orders → orphaned cleanup

Orders now maintain proper 2% distance from market price and stay active.
Cleanup system correctly identifies and removes orphaned orders when positions close.
2025-07-28 17:51:21 +02:00
..