From 49d5bfc8124f47d91ba12af3fa8fb409f41f479a Mon Sep 17 00:00:00 2001 From: uvok Date: Fri, 18 Apr 2025 19:09:38 +0200 Subject: Add fee handling --- ledger_process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledger_process.py b/ledger_process.py index d5199a6..d6b31fa 100644 --- a/ledger_process.py +++ b/ledger_process.py @@ -58,9 +58,9 @@ class LedgerProcess: t = self.external_wallet[currency].remove(lambda t: t.amount == action.amount) - # TODO: Fee handling - assert action.fee == 0 + # Fee handling: Kraken shows "full" amount first, I have to subtract the fee. wallet = self.fifo_queues[currency] + t.remove_coins(action.fee) wallet.add_trade(t) # TODO: Sort -- cgit v1.2.3