CyberPunkMetalHead / Binance-volatility-trading-bot

This is a fully functioning Binance trading bot that measures the volatility of every coin on Binance and places trades with the highest gaining coins If you like this project consider donating though the Brave browser to allow me to continuously improve the script.
MIT License
3.39k stars 774 forks source link

Bot crashes on new coin listing #213

Open vmajor opened 3 years ago

vmajor commented 3 years ago

TRIBE got listed this morning, and the bot did this:

Traceback (most recent call last): File "Binance Detect Moonings.py", line 597, in orders, last_price, volume = buy() File "Binance Detect Moonings.py", line 294, in buy volume, last_price = convert_volume() File "Binance Detect Moonings.py", line 255, in convert_volume volatile_coins, number_of_coins, last_price = wait_for_price() File "Binance Detect Moonings.py", line 153, in wait_for_price min_price = min(historical_prices, key = lambda x: float("inf") if x is None else float(x[coin]['price'])) File "Binance Detect Moonings.py", line 153, in min_price = min(historical_prices, key = lambda x: float("inf") if x is None else float(x[coin]['price'])) KeyError: 'TRIBEUSDT'

ratav commented 2 years ago

I have similar issue with C98, WAVE and others... someone knows why?

ratav commented 2 years ago

I was able to fix the problem.

The file tickers.txt is the reference file. If you want that the bot consider your new listing, you coin ticket (TRIBE), shall be inserted on that list.

THEN,

you add TRIBE on your signalsample.txt.

In summary, the tool gets the price of all tickers inside tickers.txt. while the file signalsample.txt is where you can filter the tickers to work with.

Regards,

Johnnmarnell commented 2 years ago

Didnt work for me. I made sure both files EXACTLY the same. I even went into the signalsample and changed it to only look at the tickers.txt file and still get the error. I still get the same error. Anyone else figure this out?

Johnnmarnell commented 2 years ago

I was able to fix the problem.

The file tickers.txt is the reference file. If you want that the bot consider your new listing, you coin ticket (TRIBE), shall be inserted on that list.

THEN,

you add TRIBE on your signalsample.txt.

In summary, the tool gets the price of all tickers inside tickers.txt. while the file signalsample.txt is where you can filter the tickers to work with.

Regards,

This might work but if it does not I think I figured out why mine was also crashing. This was not the reason but also would probably make it crash so good answer. BUT. If you stop your bot when testing and you have coins in your "test coins bought" and you decide to just clear them out, you cant. You can clear them out so the bot no longer sees you own them, but you must leave in the {} in the file. I think this was doing it. I just took everything out when testing and left the file blank. Then I think when the bought was trying to buy it would look to this blank file and error out. I think it needed the {} in the file to see it was truly blank. Anyway, testing again but thought it was good to share. So, just to into the test couins bought file, be sure you have at least {} in the file and you did not clear it out. THEN I would also be sure your tickers list matches your sample list like he said above.