Files
trading_bot_v3/cleanup-chromium-manual.sh
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

34 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Quick Chromium cleanup script for live trading
echo "🧹 Cleaning up Chromium processes..."
# First pass - graceful termination
pkill -TERM -f 'chromium.*--remote-debugging-port' 2>/dev/null || true
pkill -TERM -f 'chromium.*--user-data-dir' 2>/dev/null || true
pkill -TERM -f '/usr/lib/chromium/chromium' 2>/dev/null || true
pkill -TERM -f chrome 2>/dev/null || true
# Wait 2 seconds for graceful shutdown
sleep 2
# Second pass - force kill
pkill -9 -f 'chromium.*--remote-debugging-port' 2>/dev/null || true
pkill -9 -f 'chromium.*--user-data-dir' 2>/dev/null || true
pkill -9 -f '/usr/lib/chromium/chromium' 2>/dev/null || true
pkill -9 -f chrome 2>/dev/null || true
# Clean up zombie processes
pkill -9 -f 'defunct' 2>/dev/null || true
# Kill specific process types
pkill -9 -f 'type=zygote' 2>/dev/null || true
pkill -9 -f 'type=gpu-process' 2>/dev/null || true
pkill -9 -f 'type=utility' 2>/dev/null || true
echo "📊 Remaining Chromium processes:"
ps aux | grep -i chromium | grep -v grep | grep -v gotenberg || echo "✅ No Chromium processes found (excluding gotenberg)"
echo "✅ Chromium cleanup completed"