CyberPunkMetalHead / Binance-News-Sentiment-Bot

This is a fully functioning Binance trading bot that takes into account the news sentiment for the top 100 crypto feeds. If you like this project consider donating though the Brave browser to allow me to continuously improve the script.
MIT License
1.59k stars 291 forks source link

replace "coins_in_hand" with "get_asset_balance" #21

Open sprototles opened 3 years ago

sprototles commented 3 years ago

i think it would be better to directly read available coins balance from wallet

balance = client.get_asset_balance(asset='BTC')

CyberPunkMetalHead commented 3 years ago

That's a good point, how would we tell that the coin was bought via the bot and not purchased by the user?

Conight commented 3 years ago

That's a good point, how would we tell that the coin was bought via the bot and not purchased by the user?

No need, I think all users will use a new binance account for bot use.

sprototles commented 3 years ago

you can store initial balance status and then substract inital from current after every iteration

for key,value in keywords.items():
    print(key,': ',float(balance_at_start[key]['free']) - float(client.get_asset_balance(asset=key)['free']))
florisjan78 commented 3 years ago

That's a good point, how would we tell that the coin was bought via the bot and not purchased by the user?

No need, I think all users will use a new binance account for bot use.

Or disable the bot when doing manual trading.

mkharboutly commented 3 years ago

you can get the order ID of the order placed by the bot and track its status. You will have all information needed: status, quantity, price,....

geeks121 commented 2 years ago

you can get the order ID of the order placed by the bot and track its status. You will have all information needed: status, quantity, price,....

i think this is possible ,,, and stored in database ,,, mongodb for example