goranjovic55 / Binance-Trading-Bot

Binance trading bot based CyberPunkMetalHeads Binance-volatility-trading-bot
MIT License
96 stars 37 forks source link

trying to send sell Message even if Telegram disabled #1

Closed ksFPV closed 3 years ago

ksFPV commented 3 years ago

hey, you did nice Progress so far I did a Testrun this morning and it crashed on 1st sell trigger with Telegram disabled in config:

[2021-06-07 07:24:55] TP or SL reached, selling 51 POWRETH - 9.645e-05 - 9.705e-05 : 0.62% Est: 0.00003110 ETH Traceback (most recent call last): File "Binance_Detect_Moonings.py", line 922, in <module> coins_sold = sell_coins() File "Binance_Detect_Moonings.py", line 525, in sell_coins report('message', f"Sell: {coins_sold[coin]['volume']} {coin} - {BuyPrice} - {LastPrice} Profit: {profit:.{decimals()}f} {PriceChange-(TRADING_FEE*2):.{decimals()}f}%") File "Binance_Detect_Moonings.py", line 606, in report bot_token = TELEGRAM_BOT_TOKEN NameError: name 'TELEGRAM_BOT_TOKEN' is not defined

goranjovic55 commented 3 years ago

changed that now there is if in report function to test if telegrambot is enabled or no