diff --git a/crypto_tax/__init__.py b/crypto_tax/__init__.py index de3c223..d301b48 100644 --- a/crypto_tax/__init__.py +++ b/crypto_tax/__init__.py @@ -44,11 +44,12 @@ def compute_fifo(transfers: list) -> TaxReport: ledger_entries = [] prices_bought_for: dict[Asset, deque[BoughtAndNotYetSold]] = {} - if False: + if True: prices_bought_for[MPC] = deque() - prices_bought_for[MPC].append(BoughtAndNotYetSold(AssetAmount(MPC, Decimal(100)), datetime.datetime(2000, 1,1,1,1,1,1))) + # TODO: + prices_bought_for[MPC].append(BoughtAndNotYetSold(AssetAmount(MPC, Decimal(40)), datetime.datetime(2024, 4,1,1,1,1,1))) prices_bought_for[USDT] = deque() - prices_bought_for[USDT].append(BoughtAndNotYetSold(AssetAmount(USDT, Decimal(100)), datetime.datetime(2000, 1,1,1,1,1,1))) + prices_bought_for[USDT].append(BoughtAndNotYetSold(AssetAmount(USDT, Decimal(20)), datetime.datetime(2020, 1,1,1,1,1,1))) def current_balance(asset: Asset) -> AssetAmount: return sum((p.amount for p in prices_bought_for[asset]), start=AssetAmount.ZERO) @@ -83,7 +84,7 @@ def compute_fifo(transfers: list) -> TaxReport: time = executed_time, type = variant, account_provider = 'Kraken (TODO)', - amount = amount_to_sell, + amount = -amount_to_sell, balance = current_balance(amount.asset), )) diff --git a/crypto_tax/__main__.py b/crypto_tax/__main__.py index e909e7b..cf62ba7 100644 --- a/crypto_tax/__main__.py +++ b/crypto_tax/__main__.py @@ -33,7 +33,7 @@ def main(): TRANSFERS = [] TRANSFERS += list(KRAKEN_CLIENT._get_double_registers()) - #TRANSFERS += list(KUCOIN_CLIENT._get_double_registers()) + TRANSFERS += list(KUCOIN_CLIENT._get_double_registers()) tax_report = compute_fifo(TRANSFERS) logger.info('-'*80) diff --git a/crypto_tax/output_excel.py b/crypto_tax/output_excel.py index bdd416e..c24a63d 100644 --- a/crypto_tax/output_excel.py +++ b/crypto_tax/output_excel.py @@ -85,7 +85,6 @@ def write_fifo_sheet(sheet, tax_report: TaxReport): sheet.append(column_headers) row_idx = 2 for fifo_entry in tax_report.bought_and_sold_for: - print(fifo_entry) asset = fifo_entry.amount.asset exchange_rate_dkk_bought = tax_report.exchange_rate_at_time(asset, fin_defs.DKK, fifo_entry.time_bought)