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

ValueError: Operation.change must be positive. - input Kraken Statement #162

Closed
19lex82 opened this issue Mar 28, 2024 · 6 comments · Fixed by #163
Closed

ValueError: Operation.change must be positive. - input Kraken Statement #162

19lex82 opened this issue Mar 28, 2024 · 6 comments · Fixed by #163

Comments

@19lex82
Copy link

19lex82 commented Mar 28, 2024

i get the Error: ValueError: Operation.change must be positive. i used kraken Statements

the column "fee" contains negative values like: -0.3195

does the statement had only positive values before or did i make a mistake?

@provinzio
Copy link
Owner

I do not use kraken myself. Are all your fees negative? Perhaps we need to fix the readin function in book.py

@19lex82
Copy link
Author

19lex82 commented Mar 29, 2024

image
yes if the is a fee, it is negativ

@Griffsano
Copy link
Contributor

If the fee is negative, it seems like the export was changed by Kraken. Could you verify if your export looks like the actions in #97?

If any other fields changed as well, it may be possible to automatically detect the new export format. If everything stayed the same except for the sign of the fee, we could take the absolute value of the fee (if it is guaranteed that a fee is always deducted from the balance and not added).

@provinzio
Copy link
Owner

@19lex82 the PR should offer you a quick fix for your problem.

@Griffsano Instead of using the absolute value, I am checking the fee sign of the file and raise an error, if there are fees with different signs in the same file. As I am not using kraken, it's difficult for me to decide whether this is good to merge; for me it looks like it's ok. Should be good enough, what do you think?

@Griffsano
Copy link
Contributor

@provinzio Yes, checking for a consistent sign within a file is even better, #163 looks good to me.
Let's wait for @19lex82 to confirm if anything else changed in the export format.

@19lex82
Copy link
Author

19lex82 commented Mar 29, 2024

i checked the column-headers by the csv download yesterday from kraken. yes looks like column-headers are the same
image

thanks

@19lex82 19lex82 closed this as completed Mar 29, 2024
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

Successfully merging a pull request may close this issue.

3 participants