provinzio / CoinTaxman

Calculate your taxes from cryptocurrency gains
GNU Affero General Public License v3.0
140 stars 31 forks source link

Bitpanda changed fileformat #165

Open wullxz opened 4 months ago

wullxz commented 4 months ago

This PR deals with some developments for Bitpanda, which are roughly:

The detailed changes from 3 commits:

Background of the Bitpanda Pro spin off into One Trading:

Bitpanda Pro, which is used to obtain historical prices for (crypto-)assets is now ONE TRADING and a separate company to which Bitpanda only holds a minority stake. After that split, BEST can't be used anymore on ONE TRADING and historical BEST price data isn't available anymore. Also, ETHW, which stands for the Proof of Work branch of the ETH chain, isn't available on ONE TRADING.

This means, that we need to use the prices we have from the csv file as best as we can. For normal transactions, that's possible by using the "Asset market price" column of the export but for fee withdrawals from the BEST wallet, no price was actually associated with the withdrawal transaction. For now, I'm using an asset price of 0 because I don't know how to fix this otherwise.

For the normal transactions, a new property has been added to the Operation class (exported_price) to be able to carry the asset price for normal transactions into the processing classes like PriceData and use it there if a proper price can't be obtained (see get_cost method in PriceData in price_data.py).

Source: https://support.bitpanda.com/hc/en-us/articles/9374684386332-Why-is-Bitpanda-Pro-evolving-to-become-One-Trading