Files
trading_bot_v3/lib/position-consolidator.js
mindesbunister abb8c8d7f1 fix: resolve container networking issues for automation system
- Fixed internal API URLs from localhost:9001 to localhost:3000 in automation core files
- Updated lib/simple-automation.js: Fixed 5 baseUrl references for internal container calls
- Updated app/api/drift/consolidate-position/route.js: Fixed positions API fetch URL
- Updated app/api/drift/scale-position/route.js: Fixed 2 internal API calls (positions and orders)
- Updated lib/position-consolidator.js: Fixed 3 internal API calls (cancel-all-orders, place-order, positions)

This resolves 'Network Error' and 'fetch failed' issues that prevented automation
cycles from executing properly within Docker container environment.

Root cause: Automation was making fetch calls to external port (9001) from within
container instead of internal port (3000), causing connection failures.

Result: Automation cycles now execute successfully with proper internal API connectivity.
2025-07-28 01:19:37 +02:00

12 KiB