From f3473beb0080065fc681ed5f0be522e946802ab1 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Thu, 2 Apr 2026 16:54:09 -0700 Subject: [PATCH] container: lib_taxes: update bitcoin.tax docs/supported tags --- .../src/finance/lib/internal/lib_taxes.bash | 69 ++++++++++++------- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git a/container/src/finance/lib/internal/lib_taxes.bash b/container/src/finance/lib/internal/lib_taxes.bash index 213a949..1fac77e 100644 --- a/container/src/finance/lib/internal/lib_taxes.bash +++ b/container/src/finance/lib/internal/lib_taxes.bash @@ -298,10 +298,17 @@ function lib_taxes::__parse_args() function lib_taxes::__taxes() { + # # Supported tags (locally "global") - local -r _income_tags=("INCOME" "GIFTIN" "MINING" "BORROW") - local -r _spends_tags=("SPEND" "DONATION" "GIFT" "REPAY") - local -r _trades_tags=("BUY" "SELL" "SWAP" "MATCH" "REBATE" "RAW_TRADE" "PARTIAL_TRADE") + # + + local -r _income_tags=("INCOME" "INTEREST" "GIFTIN" "MINING" "BORROW" "DEPOSIT") + local -r _spends_tags=("SPEND" "DONATION" "GIFT" "REPAY" "WITHDRAWAL") + + local _trades_tags + _trades_tags+=("BUY" "SELL" "SWAP") # Upstream + _trades_tags+=("MATCH" "REBATE" "RAW_TRADE" "PARTIAL_TRADE") # Unique to `dfi` + declare -r _trades_tags local _print_year="$global_arg_year" [ -z "$_print_year" ] && _print_year="all" @@ -355,49 +362,63 @@ function lib_taxes::__taxes_print() for _arg in "${_arg_tag[@]}"; do case "$_arg" in income) + # # Date (date and time as YYYY-MM-DD HH:mm:ss Z) - # Action (INCOME, GIFTIN, MINING or BORROW) - # Account (account or wallet name, e.g. Coinbase or Blockchain) - # Symbol (BTC, ETH, LTC, etc) - # Volume (number of coins received) - # Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR) + # Action (INCOME, INTEREST, GIFTIN, MINING, BORROW or DEPOSIT) + # Account (account or wallet name, e.g. Coinbase or Ledger) + # Symbol (BTC, ETH, USDC, etc) + # Volume (amount of crypto received) # Total (Fair price or value in Currency or your home currency, or blank for market value + # Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR) + # TransferAccount (name of sending account for DEPOSIT) # Memo (optional, name of sender or item sold) - # For example, - # Date,Action,Account,Symbol,Volume - # 2020-01-01 13:00:00 -0800,INCOME,"Blockchain Wallet",BTC,1 + # + # For example: + # + # Date,Action,Account,Symbol,Volume + # 2020-01-01 13:00:00 -0800,INCOME,"Blockchain Wallet",BTC,1 + # local _tags=("${_income_tags[@]}") local _is_income=true ;; spend | spends) + # # Date (date and time as YYYY-MM-DD HH:mm:ss Z) - # Action (SPEND, DONATION, GIFT or REPAY) - # Account (name of account or wallet, e.g. Coinbase or Blockchain) - # Symbol (BTC, LTC, ETH, etc) - # Volume (number of coins spent) - # Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR) + # Action (SPEND, DONATION, GIFT, REPAY or WITHDRAWAL) + # Account (name of account or wallet, e.g. Coinbase or Ledger) + # Symbol (BTC, ETH, USDC, etc) + # Volume (amount of crypto spent or sent) # Total (Fair price or cost in Currency or your home currency, or blank for market value + # Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR) + # TransferAccount (name of receiving account for WITHDRAWAL) # Memo (optional, name of recipient or item purchased) - # For example, - # Date,Action,Account,Symbol,Volume,Total,Currency - # 2020-01-01 13:00:00 -0800,SPEND,"Blockchain Wallet",BTC,1, + # + # For example: + # + # Date,Action,Account,Symbol,Volume,Total,Currency + # 2020-01-01 13:00:00 -0800,SPEND,"Blockchain Wallet",BTC,1,500,USD + # local _tags=("${_spends_tags[@]}") local _is_spends=true ;; trade | trades) + # # Date (date and time as YYYY-MM-DD HH:mm:ss Z) # Action (BUY, SELL or SWAP) - # Account (override the exchange or wallet name, e.g. Coinbase) # Symbol (BTC, LTC, DASH, etc) # Volume (number of coins traded) # Currency (specify currency such as USD, GBP, EUR or coins, BTC or LTC) + # Account (override the exchange or wallet name, e.g. Coinbase) # Total (you can use the total Currency amount or price per coin) # Price (price per coin in Currency or blank for lookup) - # FeeCurrency (currency of fee if different than Currency) # Fee (any additional costs of the trade) - # For example, - # Date,Action,Account,Symbol,Volume,Price,Currency,Fee - # 2020-01-01 13:00:00 -0800,BUY,Coinbase,BTC,1500,USD,5.50 + # FeeCurrency (currency of fee if different than Currency) + # + # For example: + # + # Date,Action,Account,Symbol,Volume,Price,Currency,Fee + # 2020-01-01 13:00:00 -0800,BUY,Coinbase,BTC,1,500,USD,5.50 + # local _tags=("${_trades_tags[@]}") local _is_trades=true ;;