eattheblocks icon indicating copy to clipboard operation
eattheblocks copied to clipboard

Crash due to insufficient gas problem for selling automatically

Open mohdaftab opened this issue 4 years ago • 2 comments

Hi, I tried this bot and it started buying the tokens but I had around $1 worth of BNB and $15 worth of WBNB in my wallet so the bot bought some of the tokens but once the BNB balance finished for gas fee the program just crashed and wasn't able to sell the bought tokens because a few of them went up a bit in minutes. My question is how do we make the bot remember which tokens it bought and the price to sell it for so that next time when we run the bot it actually tries to sell the previously bought tokens when they hit the target price and also how to make it not crash and keep trying until there is some balance in BNB wallet please?

mohdaftab avatar Jun 07 '21 15:06 mohdaftab

for achieving that you may need to store the details of the transaction in a database and add endpoints to fetch and process the data.

PraneshASP avatar Jun 07 '21 20:06 PraneshASP

for achieving that you may need to store the details of the transaction in a database and add endpoints to fetch and process the data.

Thank you so much for the reply. Please let me know which details I need to store in the database to process them later ?

mohdaftab avatar Jun 07 '21 20:06 mohdaftab