Implement pure Drift Protocol automation system
- Remove Jupiter DEX completely from automation system - Implement exclusive Drift Protocol integration with up to 100x leverage - Update executeLiveTrade method to use only Drift API endpoints - Change default DEX provider from Jupiter to Drift - Create minimal professional UI without promotional banners - Add comprehensive leverage options (1x-100x) with risk indicators - Update automation service to route all trades through /api/automation/trade - Fix type definitions to support Drift-only configuration - Add multiple trading pairs support (SOL, BTC, ETH, APT, AVAX, DOGE) - Implement clean configuration interface with essential controls - Remove excessive marketing text and promotional elements - Maintain full automation functionality while simplifying UX
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
const fetch = require('node-fetch')
|
||||
|
||||
async function testAPI() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3001/api/automation/analysis-details')
|
||||
const data = await response.json()
|
||||
|
||||
console.log('=== API TEST RESULTS ===')
|
||||
console.log(`Success: ${data.success}`)
|
||||
console.log(`Total trades returned: ${data.data?.recentTrades?.length || 0}`)
|
||||
console.log(`Total P&L: $${data.data?.session?.totalPnL || 0}`)
|
||||
console.log(`Win Rate: ${((data.data?.session?.successfulTrades || 0) / (data.data?.session?.totalTrades || 1) * 100).toFixed(1)}%`)
|
||||
|
||||
console.log('\n=== RECENT TRADES ===')
|
||||
data.data?.recentTrades?.slice(0, 5).forEach((trade, i) => {
|
||||
console.log(`Trade ${i + 1}: ${trade.side} ${trade.amount} @ $${trade.price} = $${trade.positionSize} | P&L: $${trade.pnl} | Duration: ${trade.durationText}`)
|
||||
})
|
||||
|
||||
if (data.data?.recentTrades?.length > 5) {
|
||||
console.log(`... and ${data.data.recentTrades.length - 5} more trades`)
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('API Error:', error.message)
|
||||
}
|
||||
}
|
||||
|
||||
testAPI()
|
||||
|
||||
Reference in New Issue
Block a user