-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (22 loc) · 842 Bytes
/
main.py
File metadata and controls
28 lines (22 loc) · 842 Bytes
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
import sys
import os
from colorama import init, Fore
from src.core.trader import BinanceTrader
from config import Config
init(autoreset=True)
def main():
print(f"{Fore.CYAN} Binance Trading Analysis Tool")
print("=" * 50)
api_key = Config.BINANCE_API_KEY
api_secret = Config.BINANCE_API_SECRET
symbol = input("Enter symbol (default BTCUSDT): ").strip().upper() or Config.DEFAULT_SYMBOL
timeframe = input("Enter timeframe (1m, 5m, 15m, 1h, 4h, 1d) (default 1h): ").strip() or Config.DEFAULT_TIMEFRAME
try:
trader = BinanceTrader(api_key, api_secret)
trader.run_analysis(symbol, timeframe)
except KeyboardInterrupt:
print(f"\n{Fore.YELLOW} Analysis interrupted.")
except Exception as e:
print(f"{Fore.RED} Error: {e}")
if __name__ == "__main__":
main()