Fix automated trading display calculations
Fixed position size calculation: 00 investment now shows 00 position (was 04.76) Fixed token amount display: Now shows correct tokens (~0.996) for 00 investment (was 2.04) Corrected API route: /api/automation/analysis-details now returns 200 instead of 405 Technical changes: - Updated route calculation logic: tradingAmount / trade.price for correct token amounts - Fixed displayPositionSize to show intended investment amount - Used Docker Compose v2 for container management - Resolved Next.js module export issues The API now correctly displays trade details matching user investment intentions.
This commit is contained in:
Binary file not shown.
@@ -169,13 +169,13 @@ model AutomationSession {
|
||||
currentBalance Float?
|
||||
settings Json?
|
||||
lastAnalysis DateTime?
|
||||
lastAnalysisData Json?
|
||||
lastTrade DateTime?
|
||||
nextScheduled DateTime?
|
||||
errorCount Int @default(0)
|
||||
lastError String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
lastAnalysisData Json?
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, symbol, timeframe])
|
||||
|
||||
Reference in New Issue
Block a user