├── bot.py └── config.py /bot.py: -------------------------------------------------------------------------------- 1 | from tradingview_ta import TA_Handler, Interval 2 | import time 3 | from datetime import datetime 4 | import config 5 | from binance.client import Client 6 | from binance.enums import * 7 | 8 | client = Client(config.API_KEY, config.API_SECRET, tld='com') 9 | 10 | 11 | now = datetime.now() 12 | fecha = now.strftime("%d-%m-%y %H:%M:%S") 13 | lista = client.get_all_tickers() 14 | strongBuy_list = [] 15 | strongSell_list = [] 16 | for i in lista: 17 | tesla = TA_Handler() 18 | tesla.set_symbol_as(i['symbol']) 19 | tesla.set_exchange_as_crypto_or_stock("BINANCE") 20 | tesla.set_screener_as_crypto() 21 | tesla.set_interval_as(Interval.INTERVAL_1_HOUR) 22 | print(i['symbol']) 23 | try: 24 | print(tesla.get_analysis().summary) 25 | except Exception as e: 26 | print("No Data") 27 | continue 28 | if((tesla.get_analysis().summary)["RECOMMENDATION"])=="STRONG_BUY": 29 | print(f" Compar más fuerte {i}", fecha) 30 | strongBuy_list.append(i['symbol']) 31 | elif((tesla.get_analysis().summary)["RECOMMENDATION"])=="STRONG_SELL": 32 | print(f" Compar más fuerte {i}", fecha) 33 | strongSell_list.append(i['symbol']) 34 | 35 | print("*** STRONG BUY LIST ***") 36 | 37 | print(strongBuy_list) 38 | 39 | print("*** STRONG SELL LIST ***") 40 | 41 | print(strongSell_list) 42 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | API_KEY = 'YOUR_API_KEY' 2 | API_SECRET = 'YOUR_API_SECRET' 3 | --------------------------------------------------------------------------------