|
@@ -19,26 +19,25 @@ DATA_DIR="data"
|
|
|
# mkdir -p $DATA_DIR
|
|
|
|
|
|
# Remove trading statistics
|
|
|
-if [ -f "$DATA_DIR/trading_stats.json" ]; then
|
|
|
- rm "$DATA_DIR/trading_stats.json"
|
|
|
- echo "✅ Removed $DATA_DIR/trading_stats.json"
|
|
|
+if [ -f "$DATA_DIR/trading_stats.sqlite" ]; then
|
|
|
+ rm "$DATA_DIR/trading_stats.sqlite"
|
|
|
+ echo "✅ Removed $DATA_DIR/trading_stats.sqlite"
|
|
|
fi
|
|
|
|
|
|
-# Remove backup stats (if any were made at root or in data)
|
|
|
+# Remove legacy files (if they still exist)
|
|
|
+rm -f "$DATA_DIR/trading_stats.json"
|
|
|
rm -f trading_stats.json.backup* # Old root backups
|
|
|
rm -f "$DATA_DIR/trading_stats.json.backup*"
|
|
|
-echo "✅ Removed stats backups (if any)"
|
|
|
+echo "✅ Removed legacy stats files (if any)"
|
|
|
|
|
|
-# Remove trading engine state persistence file
|
|
|
-if [ -f "$DATA_DIR/trading_engine_state.json" ]; then
|
|
|
- rm "$DATA_DIR/trading_engine_state.json"
|
|
|
- echo "✅ Removed $DATA_DIR/trading_engine_state.json"
|
|
|
-fi
|
|
|
-# Remove old bot_state.json if it exists at root from previous versions
|
|
|
-if [ -f "bot_state.json" ]; then
|
|
|
- rm bot_state.json
|
|
|
- echo "✅ Removed legacy bot_state.json from root"
|
|
|
-fi
|
|
|
+# Remove market monitor state (legacy - now in SQLite)
|
|
|
+rm -f "$DATA_DIR/market_monitor_state.json"
|
|
|
+echo "✅ Removed legacy market monitor state (if any)"
|
|
|
+
|
|
|
+# Remove legacy bot state files (no longer used - all state now in SQLite)
|
|
|
+rm -f "$DATA_DIR/trading_engine_state.json"
|
|
|
+rm -f "bot_state.json"
|
|
|
+echo "✅ Removed legacy bot state files (if any)"
|
|
|
|
|
|
# Remove alarm data
|
|
|
if [ -f "$DATA_DIR/price_alarms.json" ]; then
|