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

Avoid raising ValueError in get_balance if currency is not found in the portfolio #46

Closed
btschwertfeger opened this issue Mar 30, 2023 · 0 comments · Fixed by #47
Closed
Assignees
Labels
Bug Something isn't working Should Something that should be implemented somewhere in the future
Milestone

Comments

@btschwertfeger
Copy link
Owner

btschwertfeger commented Mar 30, 2023

Is your feature request related to a problem? Please describe.
When using kraken.spot.client.User.get_balances it raises a ValueError if the currency is not found in the portfolio or if the value is 0. This occurs in the current version v1.0.1. This is bad, because I have to catch the exception and set the values to zero by hand. There is no reason for raising the ValueError.

Describe the solution you'd like
The behaviour should be like not raising this error, instead returning zero balances.

Additional context
Remove this lines: kraken/spot/user/user.py#L27-L28

@btschwertfeger btschwertfeger added enhancement New feature or request Should Something that should be implemented somewhere in the future labels Mar 30, 2023
@btschwertfeger btschwertfeger self-assigned this Mar 30, 2023
@btschwertfeger btschwertfeger added this to the v1.0.2 milestone Mar 30, 2023
@btschwertfeger btschwertfeger added Bug Something isn't working and removed enhancement New feature or request labels Apr 14, 2023
@btschwertfeger btschwertfeger changed the title Avoid raising ValueError in get_balance if currency is not found in the portfolio Avoid raising ValueError in get_balance if currency is not found in the portfolio Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Should Something that should be implemented somewhere in the future
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant