Files
trading_bot_v3/test-cleanup.js
mindesbunister fb194f1b12 Implement working Drift leverage trading
Key Features:
-  Drift SDK v2.126.0-beta.14 integration with Helius RPC
-  User account initialization and balance reading
-  Leverage trading API with real trades executed
-  Support for SOL, BTC, ETH, APT, AVAX, BNB, MATIC, ARB, DOGE, OP
-  Transaction confirmed: gNmaWVqcE4qNK31ksoUsK6pcHqdDTaUtJXY52ZoXRF

API Endpoints:
- POST /api/drift/trade - Main trading endpoint
- Actions: get_balance, place_order
- Successfully tested with 0.01 SOL buy order at 2x leverage

Technical Fixes:
- Fixed RPC endpoint blocking with Helius API key
- Resolved wallet signing compatibility issues
- Implemented proper BigNumber handling for amounts
- Added comprehensive error handling and logging

Trading Bot Status: 🚀 FULLY OPERATIONAL with leverage trading!
2025-07-22 12:23:51 +02:00

21 lines
715 B
JavaScript

// Test aggressive cleanup behavior in development mode
const aggressiveCleanup = require('./lib/aggressive-cleanup.ts').default;
console.log('Testing aggressive cleanup in development mode...');
console.log('NODE_ENV:', process.env.NODE_ENV);
// Test the startup
aggressiveCleanup.startPeriodicCleanup();
// Test post-analysis cleanup
console.log('\nTesting post-analysis cleanup...');
aggressiveCleanup.runPostAnalysisCleanup().then(() => {
console.log('Post-analysis cleanup completed');
}).catch(console.error);
// Test manual cleanup
console.log('\nTesting manual cleanup...');
aggressiveCleanup.cleanupOrphanedProcesses().then(() => {
console.log('Manual cleanup completed');
}).catch(console.error);