Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace "coins_in_hand" with "get_asset_balance" #21

Open
sprototles opened this issue Apr 20, 2021 · 6 comments
Open

replace "coins_in_hand" with "get_asset_balance" #21

sprototles opened this issue Apr 20, 2021 · 6 comments

Comments

@sprototles
Copy link

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

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

@CyberPunkMetalHead
Copy link
Owner

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

@Conight
Copy link

Conight commented Apr 21, 2021

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link

geeks121 commented Jan 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants