forked from tpmmthomas/binance-copy-trade-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.py
49 lines (37 loc) · 1.23 KB
/
launcher.py
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
import os
import sys
def add_directories_to_path():
current_directory = os.path.dirname(os.path.abspath(__file__))
binance_directory = os.path.join(current_directory, "Binance")
bybit_directory = os.path.join(current_directory, "Bybit")
sys.path.append(binance_directory)
sys.path.append(bybit_directory)
def clear_screen():
os.system("cls" if os.name == "nt" else "clear")
def main_menu():
print("Hello, welcome to the Bybit/Binance bot! \n")
print("Which exchange do you want to use?")
print("1. Bybit - Currently working with Telegram")
print("2. Binance - Currently working with Discord")
print("3. Exit\n")
return input(">> ")
def main():
add_directories_to_path()
import Binance.assist as binance_assist
import Bybit.assist as bybit_assist
while True:
choice = main_menu()
if choice == "1":
clear_screen()
bybit_assist.start()
elif choice == "2":
clear_screen()
binance_assist.start()
elif choice == "3":
print("Exiting...")
break
else:
clear_screen()
print("Invalid choice, please try again.")
if __name__ == "__main__":
main()