feat: implement strategy-aware analysis intervals and remove manual leverage controls
- Remove manual leverage field from automation v2 page since AI now handles leverage automatically - Fix scalping strategy analysis intervals from 60 minutes to 2 minutes for proper high-frequency trading - Implement intelligent interval detection based on selected timeframes: * Scalping: 2 minutes (5m, 3m, or multiple short timeframes) * Day trading: 5 minutes (1h, 2h timeframes) * Swing trading: 15 minutes (4h, daily timeframes) - Fix Drift SDK API calls: replace getTotalPerpPositionValue() with getFreeCollateral() - Clean up UI by removing manual controls since AI systems handle optimization - Fix syntax errors in automation service and balance API - Ensure proper margin calculations using correct Drift Protocol methods Tested: Scalping strategy now correctly analyzes every 2 minutes instead of 60 minutes
This commit is contained in:
@@ -17,7 +17,6 @@ export async function POST(request) {
|
||||
// Map tradeSize to tradingAmount
|
||||
tradingAmount: config.tradeSize || config.tradingAmount,
|
||||
// Set defaults for missing fields
|
||||
maxLeverage: config.maxLeverage || 2,
|
||||
maxDailyTrades: config.maxDailyTrades || 5,
|
||||
dexProvider: config.dexProvider || 'DRIFT',
|
||||
selectedTimeframes: config.selectedTimeframes || [config.timeframe || '1h']
|
||||
|
||||
Reference in New Issue
Block a user