-
Notifications
You must be signed in to change notification settings - Fork 47
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
Followed the installation and running the example. #126
Comments
I just updated ID 4 from 1 BTC to 5 BTC and the example works well. I am happy to set up the project and try to help out while I am testing it. Never really done python, but that should be OK. |
Although crypto_example.ods has not changed in two years, it seems the Coinbase wallet does in fact go negative. Bob bought 1 BTC, sold 0.2, transferred 0.1 to BlockFi, and at this point has 0.7 BTC in Coinbase. He then sold 1 BTC, which results in a negative balance for Coinbase of 0.3. Prior to this, he bought 2 BTC on BlockFi. There was likely a code change at some point where RP2 was previously looking at asset balance in aggregate (all Exchanges) and now looks at asset balance per Exchange. I suggest you make some changes to crypto_example.ods and submit a pull request. I would suggest changing it from 1 to something smaller than 5. Maybe try 0.7 and see if it errors out elsewhere. |
You have to run the command with the
The reason for the introduction of The problem here was that the README.md hadn't been updated to reflect that |
Thanks for catching my oversight :) |
Not an oversight: there was a bit of missing info in the docs, so thanks for pointing that out! |
sudo apt-get install python3 python3-pip
pip install rp2
Downloaded: crypto_example.ini crypto_example.ods
Ran the suggested command:~/rp2$ ~/.local/bin/rp2_us -m fifo -o output -p crypto_example_ crypto_example.ini crypto_example.ods
INFO: Country: us
INFO: Generation Language: en
INFO: Accounting method: fifo
INFO: Configuration file: crypto_example.ini
INFO: Input file: crypto_example.ods
INFO: Processing BTC
ERROR: Fatal exception occurred:
Traceback (most recent call last):
File "/home/haavard/.local/lib/python3.10/site-packages/rp2/rp2_main.py", line 154, in _rp2_main_internal
computed_data: ComputedData = compute_tax(configuration=configuration, accounting_engine=accounting_engine, input_data=input_data)
File "/home/haavard/.local/lib/python3.10/site-packages/rp2/tax_engine.py", line 47, in compute_tax
return ComputedData(
File "/home/haavard/.local/lib/python3.10/site-packages/rp2/computed_data.py", line 222, in init
self.__filtered_balance_set: BalanceSet = BalanceSet(unfiltered_taxable_event_set.configuration, input_data, to_date)
File "/home/haavard/.local/lib/python3.10/site-packages/rp2/balance.py", line 172, in init
raise RP2ValueError(
rp2.rp2_error.RP2ValueError: BTC balance of account "Coinbase" (holder "Bob") went negative (-0.30000000000) on the following transaction: OutTransaction:
id=15
timestamp=2020-02-11 19:58:00.000000 +0000
asset=BTC
exchange=Coinbase
holder=Bob
transaction_type=TransactionType.SELL
spot_price=12200.0000
crypto_out_no_fee=1.00000000
crypto_fee=0.00000000
unique_id=
is_taxable=True
fiat_taxable_amount=12200.0000
The text was updated successfully, but these errors were encountered: