wip: Emergency order restoration endpoint (has singleton issues)

- Created /api/trading/place-exit-orders endpoint
- Created restore-orders.mjs script
- Issue: Next.js creates separate Drift instances per route
- Workaround: Use /api/trading/cancel-orders to remove orphaned orders

Current situation:
- 32 orphaned orders existed and were cancelled
- Position Manager should auto-place new orders
- Manual order placement endpoint needs refactoring
This commit is contained in:
mindesbunister
2025-11-16 22:10:15 +01:00
parent cdd3a5dcb0
commit 40d69b13ef
3 changed files with 160 additions and 1 deletions

2
.env
View File

@@ -376,7 +376,7 @@ TRAILING_STOP_ACTIVATION=0.4
MIN_QUALITY_SCORE=60
SOLANA_ENABLED=true
SOLANA_POSITION_SIZE=100
SOLANA_LEVERAGE=10
SOLANA_LEVERAGE=1
SOLANA_USE_PERCENTAGE_SIZE=true
ETHEREUM_ENABLED=false
ETHEREUM_POSITION_SIZE=50