1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #!/bin/bash
- echo "🗑️ Resetting Hyperliquid Trading Bot Data"
- echo "========================================="
- # Confirm with user
- read -p "⚠️ This will delete ALL trading data, stats, and logs. Are you sure? (yes/no): " confirm
- if [ "$confirm" != "yes" ]; then
- echo "❌ Reset cancelled."
- exit 1
- fi
- echo "🧹 Clearing data files..."
- # Remove trading statistics
- if [ -f "trading_stats.json" ]; then
- rm trading_stats.json
- echo "✅ Removed trading_stats.json"
- fi
- # Remove backup stats
- rm -f trading_stats.json.backup*
- echo "✅ Removed stats backups"
- # Remove bot state persistence file
- if [ -f "bot_state.json" ]; then
- rm bot_state.json
- echo "✅ Removed bot_state.json"
- fi
- # Remove alarm data
- if [ -f "price_alarms.json" ]; then
- rm price_alarms.json
- echo "✅ Removed price_alarms.json"
- fi
- rm -f alarms.json alarms.db
- echo "✅ Removed legacy alarm data"
- # Remove log files
- rm -f *.log trading_bot.log*
- rm -rf logs/
- echo "✅ Removed log files"
- # Remove any temporary files
- rm -f *.tmp *.temp
- echo "✅ Removed temporary files"
- # Remove any Python cache
- rm -rf __pycache__/
- rm -rf src/__pycache__/
- rm -rf tests/__pycache__/
- echo "✅ Removed Python cache"
- echo ""
- echo "🎉 Data reset complete!"
- echo ""
- echo "📝 What was cleared:"
- echo " • Trading statistics and P&L history"
- echo " • All completed trade records"
- echo " • Daily/weekly/monthly performance data"
- echo " • Bot state persistence (pending stop losses, order tracking)"
- echo " • Price alarms and notifications"
- echo " • Log files and debugging data"
- echo " • Enhanced position tracking data"
- echo ""
- echo "🚀 Your bot is now ready for a fresh start!"
- echo " • Initial balance will be reset"
- echo " • All stats will start from zero"
- echo " • Position tracking will reinitialize"
- echo " • Bot state persistence will restart fresh"
- echo " • Pending stop losses will be cleared"
- echo ""
- echo "💡 Next steps:"
- echo " 1. Run your bot: python src/telegram_bot.py"
- echo " 2. Check /balance to set initial balance"
- echo " 3. Start trading to build new statistics"
|