-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_bot.bat
More file actions
148 lines (132 loc) · 4.24 KB
/
Copy pathstart_bot.bat
File metadata and controls
148 lines (132 loc) · 4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@echo off
setlocal
cd /d "%~dp0"
echo --------------------------------------------------
echo Trading Bot Agent System - Startpruefung
echo --------------------------------------------------
if not exist "phemex_strategy_observer.py" (
echo FEHLER: phemex_strategy_observer.py nicht gefunden.
echo Bitte start_bot.bat im Projektordner ausfuehren.
pause
exit /b 1
)
if not exist "requirements.txt" (
echo FEHLER: requirements.txt nicht gefunden.
echo Python-Abhaengigkeiten koennen nicht installiert werden.
pause
exit /b 1
)
set "PYTHON_CMD="
where py >nul 2>nul
if not errorlevel 1 (
py -3 --version >nul 2>nul
if not errorlevel 1 set "PYTHON_CMD=py -3"
)
if "%PYTHON_CMD%"=="" (
where python >nul 2>nul
if not errorlevel 1 set "PYTHON_CMD=python"
)
if "%PYTHON_CMD%"=="" (
echo FEHLER: Python wurde nicht gefunden.
echo Bitte Python installieren oder den Windows Python Launcher py aktivieren.
pause
exit /b 1
)
echo Python Runtime: %PYTHON_CMD%
if not exist "config.json" (
if exist "config.example.json" (
echo HINWEIS: config.json fehlt. Erstelle lokale config.json aus config.example.json.
copy "config.example.json" "config.json" >nul
) else (
echo FEHLER: config.json fehlt und config.example.json wurde nicht gefunden.
echo Erwartet: Copy-Item config.example.json config.json
pause
exit /b 1
)
)
if not exist ".env" (
if exist ".env.example" (
echo HINWEIS: .env fehlt. Erstelle lokale .env aus .env.example.
copy ".env.example" ".env" >nul
) else (
echo WARNUNG: .env fehlt und .env.example wurde nicht gefunden.
echo Public-Klines koennen funktionieren, private Accountdaten nicht.
)
)
if not exist "data" (
mkdir "data"
)
if exist "tools\prepare_dashboard_runtime.py" (
echo --------------------------------------------------
echo Bereite Dashboard Runtime vor
echo --------------------------------------------------
%PYTHON_CMD% tools\prepare_dashboard_runtime.py
if errorlevel 1 (
echo FEHLER: Dashboard Runtime konnte nicht vorbereitet werden.
pause
exit /b 1
)
)
if exist "checks\check_dashboard_runtime_patches.py" (
echo --------------------------------------------------
echo Pruefe Dashboard Runtime Patches
echo --------------------------------------------------
%PYTHON_CMD% checks\check_dashboard_runtime_patches.py
if errorlevel 1 (
echo FEHLER: Dashboard Runtime Patches sind ungueltig.
pause
exit /b 1
)
)
if exist "checks\check_agent_runtime_roles.py" (
echo --------------------------------------------------
echo Pruefe Agenten-Rollenvertrag
echo --------------------------------------------------
%PYTHON_CMD% checks\check_agent_runtime_roles.py
if errorlevel 1 (
echo FEHLER: Agenten-Rollenvertrag ist ungueltig.
pause
exit /b 1
)
)
if exist "checks\check_brain_replay_enhancements.py" (
echo --------------------------------------------------
echo Pruefe Brain Replay Enhancements
echo --------------------------------------------------
%PYTHON_CMD% checks\check_brain_replay_enhancements.py
if errorlevel 1 (
echo FEHLER: Brain Replay Enhancements sind ungueltig.
pause
exit /b 1
)
)
if exist "checks\check_brain_dashboard_enhancements.py" (
echo --------------------------------------------------
echo Pruefe Brain Dashboard Enhancements
echo --------------------------------------------------
%PYTHON_CMD% checks\check_brain_dashboard_enhancements.py
if errorlevel 1 (
echo FEHLER: Brain Dashboard Enhancements sind ungueltig.
pause
exit /b 1
)
)
echo --------------------------------------------------
echo Installiere/pruefe Python-Abhaengigkeiten
echo --------------------------------------------------
%PYTHON_CMD% -m pip install -r requirements.txt
if errorlevel 1 (
echo FEHLER: Python-Abhaengigkeiten konnten nicht installiert werden.
pause
exit /b 1
)
echo --------------------------------------------------
echo Starte Dashboard
echo --------------------------------------------------
%PYTHON_CMD% phemex_strategy_observer.py --config config.json --web
if errorlevel 1 (
echo FEHLER: Bot wurde mit Fehler beendet.
pause
exit /b 1
)
pause