docs: Verify LONG adaptive leverage + update test endpoint

- Created LONG_ADAPTIVE_LEVERAGE_VERIFICATION.md with complete verification
- Logic testing confirms Q95+ = 15x, Q90-94 = 10x (100% correct)
- Updated test endpoint to pass direction parameter (best practice)
- Backward compatibility verified (works with or without direction)
- No regressions from SHORT implementation
- Awaiting first production LONG trade for final validation
This commit is contained in:
mindesbunister
2025-11-25 12:43:33 +01:00
parent 439c5a1ee8
commit 5d66ecf5ce
3 changed files with 649 additions and 1 deletions

View File

@@ -75,12 +75,14 @@ export async function POST(request: NextRequest): Promise<NextResponse<TestTrade
// Get symbol-specific position sizing (with percentage support)
// Test trades use quality score 100 for maximum leverage (manual override)
// ENHANCED Nov 25, 2025: Pass direction for direction-specific adaptive leverage
const { getActualPositionSizeForSymbol } = await import('@/config/trading')
const { size: positionSize, leverage, enabled, usePercentage } = await getActualPositionSizeForSymbol(
driftSymbol,
config,
health.freeCollateral,
100 // Test trades always use max leverage (quality 100)
100, // Test trades always use max leverage (quality 100)
body.direction // Pass direction for adaptive leverage
)
// Check if trading is enabled for this symbol