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

Cryptos fail on quantity #10

Closed
deicon opened this issue Dec 28, 2021 · 5 comments
Closed

Cryptos fail on quantity #10

deicon opened this issue Dec 28, 2021 · 5 comments

Comments

@deicon
Copy link

deicon commented Dec 28, 2021

As cryptos are bought in fractions this check here fails.

int(quantity) != quantity

if isnan(quantity):
quantity = 1
else:
if tcode == 'Receive Deliver' and (tsubcode == 'Forward Split' or tsubcode == 'Reverse Split'):
pass # splits might have further data, not quantity
elif int(quantity) != quantity:
raise
else:
quantity = int(quantity)

@laroche
Copy link
Owner

laroche commented Dec 31, 2021

I have no experience with cryptos. Is this check the only thing that breaks? Should cryptos be within a new trading group?
(Are you buying cryptos directly with Tastyworks or a derivative product?)
How can they be detected? With a list of symbol names? Then I could remove this check only for cryptos and keep it for
everything else.

Thanks for this feedback,

Florian La Roche

@deicon
Copy link
Author

deicon commented Dec 31, 2021

2021-09-03T20:50:34+0200,Trade,SELL_TO_CLOSE,ETH/USD,Cryptocurrency,Sold 0.2637329 ETH/USD @ 3948.01,"1,041.22",0.2637329,"3,948.01",-10.00,0.00,,,,,,,11111111
2021-09-02T21:33:54+0200,Trade,BUY_TO_OPEN,ETH/USD,Cryptocurrency,Bought 0.2637329 ETH/USD @ 3791.71,"-1,000.00",0.2637329,"-3,791.72",-10.00,0.00,,,,,,,111111111

@deicon
Copy link
Author

deicon commented Dec 31, 2021

I believe cryptos need to be handled in their own group as far as I understand our tax system. Which I don't really :)

@laroche
Copy link
Owner

laroche commented Jan 1, 2022

The above entry seems to come from the Desktop App, right? Can you provide them from the web download,
then I might finish some first support for cryptos based on that.

Thanks a lot,

Florian La Roche

@laroche
Copy link
Owner

laroche commented Aug 19, 2022

Crypto support is merged into the current version. Since I am not using it myself, please
open a new issue if further changes are needed. I think the above example should work ok.

best regards,

Florian La Roche

@laroche laroche closed this as completed Aug 19, 2022
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

2 participants