docker-finance | modern accounting for the power-user

Dedicated to Michael Morgan: a beautiful, beautiful soul.

---

Internal signing keys:

  Aaron Fiore (sole author)

    - 518A22F85BEFD32BCC99C48603F90C4F35E0213E
    - 31ECA5C347A0CC0815EDE730A3EACCFCDA7E685E
    - C8187C585CB07A4DA81CC0F37318B50EBE9C0DA8

Internal repositories (rebased from):

  Staging:

    $ git log -n1 --pretty=format:"%H"
    c8e0cd66f6c89fa7b3c62f72fb524a4cc454b7b6

    $ git rev-list --max-parents=0 HEAD
    ac3863b8c234755855f1aea3a07a853122decdf2

  Private:

    $ git log -n1 --pretty=format:"%H"
    69bb3591eaa2990a9637832bb484690e00c4f926

    $ git rev-list --max-parents=0 HEAD
    a5c1cc9fb593c4cf09bc0adfef6cb6d2964511ae
This commit is contained in:
2024-03-04 03:12:40 -08:00
commit b621e87df2
505 changed files with 37687 additions and 0 deletions

View File

@@ -0,0 +1,130 @@
#!/usr/bin/env bash
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# "Libraries"
#
[ -z "$DOCKER_FINANCE_CONTAINER_REPO" ] && exit 1
source "${DOCKER_FINANCE_CONTAINER_REPO}/src/hledger-flow/lib/lib_preprocess.bash" "$1" "$2"
#
# Implementation
#
[ -z "$global_year" ] && exit 1
[ -z "$global_subaccount" ] && exit 1
[ -z "$global_in_path" ] && exit 1
[ -z "$global_out_path" ] && exit 1
#
# Unified format between all file types:
#
# UID,Date,Type,SubType,CurrencyOne,CurrencyOneAmount,CurrencyTwo,CurrencyTwoAmount,RateCurrency,RateAmount,Direction,Subaccount
#
# TODO: fees are in transaction type, be sure to include that in rules file
function parse_transaction()
{
lib_preprocess::assert_header "Cryptocurrency,Amount,Transaction Type,Confirmed At"
gawk -v global_year="$global_year" -v global_subaccount="$global_subaccount" \
'{
if (NR<2 || $4 !~ global_year)
next
# Trades are included in transactions... including ACH (USD) trades...
UID=""; if ($1 ~ /^USD$/ || $3 ~ /Trade$/) {UID="SKIP"} # NOTE: Trade is not ^ because there are multiple Trade types
# NOTE: BIA "Withdrawals" are not real withdrawals, so they are left positive
amount = $2
direction="IN"
if (amount ~ /^-/) {direction="OUT"} # WARNING: anchor "-" at beginning of line or else E-N amounts will be broken
# Remove sign for printing
sub(/^-/, "", amount)
printf UID OFS # UID
printf $4 OFS # Date
printf "TRANSACTION" OFS # Type
printf $3 OFS # SubType
printf $1 OFS # CurrencyOne
printf("%.8f", amount); printf OFS # CurrencyOneAmount
printf OFS # CurrencyTwo
printf OFS # CurrencyTwoAmount
printf OFS # RateCurrency
printf OFS # RateAmount
printf direction OFS # Direction
printf global_subaccount # Subaccount
printf "\n"
}' FS=, OFS=, "$global_in_path" >"$global_out_path"
# If out file has no transactions (and only trades), such as at the beginning
# of the year, it will create empty file in 2-preprocessed. The following hack
# exists because hledger-flow won't ignore deleted 1-in and 2-preprocessed
# files after this script has been called.
#
# WARNING: must be also applied in rules file
if [ ! -s "$global_out_path" ]; then
echo "SKIP,date,type,sub_type,currency_one,currency_one_amount,currency_two,currency_two_amount,rate_currency,rate_amount" >"$global_out_path"
fi
}
function parse_trade()
{
lib_preprocess::assert_header "Trade ID,Date,Buy Quantity,Buy Currency,Sold Quantity,Sold Currency,Rate Amount,Rate Currency,Type,Frequency,Destination"
gawk -v global_year="$global_year" -v global_subaccount="$global_subaccount" \
'{
if (NR<2 || $2 !~ global_year)
next
printf $1 OFS # UID
printf $2 OFS # Date
printf $9 OFS # Type
printf $10 OFS # SubType
printf toupper($4); printf OFS # CurrencryOne
printf("%.8f", $3); printf OFS # CurrencyOneAmount
printf toupper($6); printf OFS # CurrencyTwo
printf("%.8f", $5); printf OFS # CurrencyTwoAmount
printf toupper($8); printf OFS # RateCurrency
printf("%.8f", $7); printf OFS # RateAmount
printf OFS # Direction
printf global_subaccount # Subaccount
printf "\n";
}' FS=, OFS=, "$global_in_path" >"$global_out_path"
}
function main()
{
lib_preprocess::test_header "Confirmed At" && parse_transaction && return 0
lib_preprocess::test_header "Trade ID" && parse_trade && return 0
}
main "$@"
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1,173 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
fields code_,date,type,sub_type,currency_one,currency_one_amount,currency_two,currency_two_amount,rate_currency,rate_amount,direction,subaccount
date-format %Y-%m-%d %H:%M:%S
description %date +0000
account1 assets:blockfi:%subaccount:%currency_one
amount %currency_one_amount %currency_one
comment type:%type, sub_type:%sub_type, direction:%direction
# NOTE: see preprocess
if %code_ SKIP
skip
# TODO: add subaccounts
################################################################################
# #
# TRANSFER #
# #
################################################################################
# TODO: get time as only time and add as time:%time (not date, just time. hledger is not timestamp friendly)
# UPDATE: 2022-02-02: BlockFi now has a separation of concerns on their platform for crypto accounting
#
# 1. "Wallet account"
# 2. "BIA (blockfi interest account) account"
#
# From the website:
#
# "Note: With the launch of BlockFi Wallet, all trading activity,
# credit card rewards accumulation and collateral transfers for
# loan products are conducted within Wallet."
#
# If docker-finance tries to create rules through hacks, the rules all work
# except for the crucial `Withdrawal` (which is the same for either accounts),
# thus ruining any chance to easily account. As a result, current treatment
# is to treat the account as a single account by dropping the internal
# transfers. Again, would love to know the difference between wallet
# withdrawal and an older BIA-style withdrawal but they make no indication of
# which-is-which via the given line.
if %sub_type ^BIA
skip
if %direction ^OUT$
amount -%currency_one_amount %currency_one
# Default transfers as equity accounts
if %direction ^IN$
account2 equity:blockfi:%subaccount:withdrawal:%currency_one
if %direction ^OUT$
account2 equity:blockfi:%subaccount:deposit:%currency_one
if %direction ^OUT$
& %sub_type ^Withdrawal Fee$
account2 expenses:blockfi:%subaccount:withdrawals:fees:%currency_one
comment type:%type, sub_type:%sub_type, direction:%direction, taxed_as:SPEND
comment2 %date +0000,SPEND,blockfi,%currency_one,%currency_one_amount,USD,,FEE
if %direction ^OUT$
& %sub_type ^Withdrawal Fee$
& %currency_one (^GUSD$|^PAX$|^USDC$)
comment2 %date +0000,SPEND,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,FEE
# ---------------------------------------------------------------------------- #
# Transfers (Trades) #
# ---------------------------------------------------------------------------- #
# Annoying: ACH Trades pulls fiat from blockfi account when it's actually from an external account
if %type ^ACH Trade$
amount %currency_one_amount %currency_one @@ %currency_two_amount USD
account2 equity:blockfi:%subaccount:USD
comment type:%type, sub_type:%sub_type, code:%code_, taxed_as:BUY
comment2 %date +0000,BUY,blockfi,%currency_one,%currency_one_amount,USD,%currency_two_amount,,
# They don't document ACH Deposits, which are instant buys for stablecoins (currently only GUSD).
if %sub_type (^Ach Deposit$|^Wire Deposit$)
& %currency_one ^GUSD$
amount %currency_one_amount %currency_one @@ %currency_one_amount USD
account2 equity:blockfi:%subaccount:USD
comment type:%type, sub_type:%sub_type, taxed_as:BUY
comment2 %date +0000,BUY,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,,
# They don't document ACH Withdrawals, which are instant sells for stablecoins.
if %sub_type ^Ach Withdrawal$
amount -%currency_one_amount %currency_one @@ %currency_one_amount USD
account2 equity:blockfi:%subaccount:USD
comment type:%type, sub_type:%sub_type, taxed_as:SELL
comment2 %date +0000,SELL,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,,
################################################################################
# #
# TRADE #
# #
################################################################################
# Trades NOTE:
# - Unless specified, all trades are treated as "sells"
# - All trades are market orders (no limit option)
if %type ^TRADE$
account1 assets:blockfi:%subaccount:%currency_two
amount -%currency_two_amount %currency_two @@ %currency_one_amount %currency_one
account2 assets:blockfi:%subaccount:%currency_one
comment type:%type, sub_type:%sub_type, code:%code_, taxed_as:SELL
comment2 %date +0000,SELL,blockfi,%currency_two,%currency_two_amount,%currency_one,%currency_one_amount,,
################################################################################
# #
# INCOME #
# #
################################################################################
if %direction ^IN$
& %sub_type (^Interest Payment$|^Bonus Payment$|^Cc Rewards Redemption$|^Cc Trading Rebate$)
account2 income:blockfi:%subaccount:%currency_one
comment type:%type, sub_type:%sub_type, direction:%direction, taxed_as:INCOME
comment2 %date +0000,INCOME,blockfi,%currency_one,%currency_one_amount,USD,,INTEREST
if %direction ^IN$
& %sub_type ^Interest Payment$
& %currency_one (^GUSD$|^PAX$|^USDC$)
comment2 %date +0000,INCOME,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,INTEREST
# ---------------------------------------------------------------------------- #
# Bonuses #
# ---------------------------------------------------------------------------- #
if %direction ^IN$
& %sub_type ^Bonus Payment$
comment2 %date +0000,INCOME,blockfi,%currency_one,%currency_one_amount,USD,,INCOME
if %direction ^IN$
& %sub_type ^Bonus Payment$
& %currency_one (^GUSD$|^PAX$|^USDC$)
comment2 %date +0000,INCOME,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,INCOME
# ---------------------------------------------------------------------------- #
# Rebates #
# ---------------------------------------------------------------------------- #
# Rebates are not considered taxable income. Still need open position.
if %direction ^IN$
& %sub_type (^Cc Rewards Redemption$|^Cc Trading Rebate$)
comment type:%type, sub_type:%sub_type, direction:%direction, taxed_as:REBATE
comment2 %date +0000,BUY,blockfi,%currency_one,%currency_one_amount,USD,,,
if %direction ^IN$
& %sub_type (^Cc Rewards Redemption$|^Cc Trading Rebate$)
& %currency_one (^GUSD$|^PAX$|^USDC$)
comment2 %date +0000,BUY,blockfi,%currency_one,%currency_one_amount,USD,%currency_one_amount,,
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[ -z "$DOCKER_FINANCE_CONTAINER_REPO" ] && exit 1
source "${DOCKER_FINANCE_CONTAINER_REPO}/src/hledger-flow/accounts/blockfi/blockfi-shared.bash"
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../../../../src/accounts/blockfi/blockfi-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1,9 @@
Trade ID,Date,Buy Quantity,Buy Currency,Sold Quantity,Sold Currency,Rate Amount,Rate Currency,Type,Frequency,Destination
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8,2022-07-31 23:59:59,123.00000000,pax,123.00000000,usdc,1.00000000,pax,Trade,One Time,Wallet
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7,2021-12-31 23:59:59,23304.62634204,gusd,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6,2021-12-31 23:59:59,23304.62634204,pax,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5,2021-12-31 23:59:59,0.00211900,btc,100.0000,usd,47191.86838984,usd,ACH Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4,2021-12-31 23:59:59,1234.56000000,pax,1234.56000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3,2020-12-31 23:59:59,250.00000000,gusd,0.01234567,btc,28837.28852896,gusd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2,2020-12-31 23:59:59,100.00000000,pax,100.00000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1,2020-12-31 23:59:59,500.00000000,usdc,0.02469134,btc,28837.28852896,usdc,Trade,One Time,Interest Account
1 Trade ID Date Buy Quantity Buy Currency Sold Quantity Sold Currency Rate Amount Rate Currency Type Frequency Destination
2 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8 2022-07-31 23:59:59 123.00000000 pax 123.00000000 usdc 1.00000000 pax Trade One Time Wallet
3 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7 2021-12-31 23:59:59 23304.62634204 gusd 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
4 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6 2021-12-31 23:59:59 23304.62634204 pax 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
5 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5 2021-12-31 23:59:59 0.00211900 btc 100.0000 usd 47191.86838984 usd ACH Trade One Time Interest Account
6 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4 2021-12-31 23:59:59 1234.56000000 pax 1234.56000000 gusd 1.00000000 pax Trade One Time Interest Account
7 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3 2020-12-31 23:59:59 250.00000000 gusd 0.01234567 btc 28837.28852896 gusd Trade One Time Interest Account
8 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2 2020-12-31 23:59:59 100.00000000 pax 100.00000000 gusd 1.00000000 pax Trade One Time Interest Account
9 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1 2020-12-31 23:59:59 500.00000000 usdc 0.02469134 btc 28837.28852896 usdc Trade One Time Interest Account

View File

@@ -0,0 +1,16 @@
Cryptocurrency,Amount,Transaction Type,Confirmed At
BTC,0.00054321,Bonus Payment,2020-12-31 23:59:59
BTC,-0.00000000,Trade,2020-12-31 23:59:59
GUSD,0.00000000,Trade,2020-12-31 23:59:59
PAX,-100.00000000,Withdrawal,2020-12-31 23:59:59
GUSD,-0.00000000,Trade,2020-12-31 23:59:59
PAX,0.00000000,Trade,2020-12-31 23:59:59
USDC,2000.00000000,Crypto Transfer,2020-12-30 23:59:59
BTC,-0.00000000,Trade,2020-12-31 23:59:59
USDC,0.00000000,Trade,2020-12-31 23:59:59
USDC,-0.25000000,Withdrawal Fee,2020-12-31 23:59:59
USDC,-500.00000000,Withdrawal,2020-12-31 23:59:59
USDC,1500.00000000,Crypto Transfer,2020-12-30 23:59:59
GUSD,2500.00,Wire Deposit,2020-12-31 23:59:59
BTC,0.00001234,Interest Payment,2020-12-31 23:59:59
BTC,1.23456789,Crypto Transfer,2020-12-30 23:59:59
1 Cryptocurrency Amount Transaction Type Confirmed At
2 BTC 0.00054321 Bonus Payment 2020-12-31 23:59:59
3 BTC -0.00000000 Trade 2020-12-31 23:59:59
4 GUSD 0.00000000 Trade 2020-12-31 23:59:59
5 PAX -100.00000000 Withdrawal 2020-12-31 23:59:59
6 GUSD -0.00000000 Trade 2020-12-31 23:59:59
7 PAX 0.00000000 Trade 2020-12-31 23:59:59
8 USDC 2000.00000000 Crypto Transfer 2020-12-30 23:59:59
9 BTC -0.00000000 Trade 2020-12-31 23:59:59
10 USDC 0.00000000 Trade 2020-12-31 23:59:59
11 USDC -0.25000000 Withdrawal Fee 2020-12-31 23:59:59
12 USDC -500.00000000 Withdrawal 2020-12-31 23:59:59
13 USDC 1500.00000000 Crypto Transfer 2020-12-30 23:59:59
14 GUSD 2500.00 Wire Deposit 2020-12-31 23:59:59
15 BTC 0.00001234 Interest Payment 2020-12-31 23:59:59
16 BTC 1.23456789 Crypto Transfer 2020-12-30 23:59:59

View File

@@ -0,0 +1,9 @@
Trade ID,Date,Buy Quantity,Buy Currency,Sold Quantity,Sold Currency,Rate Amount,Rate Currency,Type,Frequency,Destination
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8,2022-07-31 23:59:59,123.00000000,pax,123.00000000,usdc,1.00000000,pax,Trade,One Time,Wallet
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7,2021-12-31 23:59:59,23304.62634204,gusd,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6,2021-12-31 23:59:59,23304.62634204,pax,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5,2021-12-31 23:59:59,0.00211900,btc,100.0000,usd,47191.86838984,usd,ACH Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4,2021-12-31 23:59:59,1234.56000000,pax,1234.56000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3,2020-12-31 23:59:59,250.00000000,gusd,0.01234567,btc,28837.28852896,gusd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2,2020-12-31 23:59:59,100.00000000,pax,100.00000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1,2020-12-31 23:59:59,500.00000000,usdc,0.02469134,btc,28837.28852896,usdc,Trade,One Time,Interest Account
1 Trade ID Date Buy Quantity Buy Currency Sold Quantity Sold Currency Rate Amount Rate Currency Type Frequency Destination
2 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8 2022-07-31 23:59:59 123.00000000 pax 123.00000000 usdc 1.00000000 pax Trade One Time Wallet
3 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7 2021-12-31 23:59:59 23304.62634204 gusd 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
4 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6 2021-12-31 23:59:59 23304.62634204 pax 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
5 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5 2021-12-31 23:59:59 0.00211900 btc 100.0000 usd 47191.86838984 usd ACH Trade One Time Interest Account
6 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4 2021-12-31 23:59:59 1234.56000000 pax 1234.56000000 gusd 1.00000000 pax Trade One Time Interest Account
7 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3 2020-12-31 23:59:59 250.00000000 gusd 0.01234567 btc 28837.28852896 gusd Trade One Time Interest Account
8 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2 2020-12-31 23:59:59 100.00000000 pax 100.00000000 gusd 1.00000000 pax Trade One Time Interest Account
9 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1 2020-12-31 23:59:59 500.00000000 usdc 0.02469134 btc 28837.28852896 usdc Trade One Time Interest Account

View File

@@ -0,0 +1,26 @@
Cryptocurrency,Amount,Transaction Type,Confirmed At
GUSD,-20000.00000000,Ach Withdrawal,2021-12-31 23:59:59
PAX,-20000.00000000,Ach Withdrawal,2021-12-31 23:59:59
GUSD,-1500.00000000,Ach Withdrawal,2021-12-31 23:59:59
BTC,0.00001234,Cc Rewards Redemption,2021-12-31 23:59:59
BTC,0.00000123,Cc Trading Rebate,2021-12-31 23:59:59
BTC,0.00010323,Bonus Payment,2021-12-31 23:59:59
USD,-0.00000000,Ach Trade,2021-12-31 23:59:59
BTC,0.00000000,Ach Trade,2021-12-31 23:59:59
GUSD,100.00000000,Ach Deposit,2021-12-31 23:59:59
USDC,-100.00000000,Ach Withdrawal,2021-12-31 23:59:59
GUSD,100.00000000,Crypto Transfer,2021-12-30 23:59:59
USDC,-0.25000000,Withdrawal Fee,2021-12-31 23:59:59
USDC,-199.99000000,Withdrawal,2021-12-31 23:59:59
GUSD,-0.00000000,Trade,2021-12-31 23:59:59
PAX,0.00000000,Trade,2021-12-31 23:59:59
BTC,-0.00000000,Trade,2021-12-31 23:59:59
GUSD,0.00000000,Trade,2021-12-31 23:59:59
BTC,-0.00000000,Trade,2021-12-31 23:59:59
PAX,0.00000000,Trade,2021-12-31 23:59:59
BTC,-0.02000000,Withdrawal,2021-12-31 23:59:59
USDC,-123.45000000,Withdrawal,2021-12-31 23:59:59
BTC,0.01234567,Interest Payment,2021-12-31 23:59:59
USDC,12.34567890,Interest Payment,2021-12-31 23:59:59
PAX,12.34567890,Interest Payment,2021-12-31 23:59:59
GUSD,12.34567890,Interest Payment,2021-12-31 23:59:59
1 Cryptocurrency Amount Transaction Type Confirmed At
2 GUSD -20000.00000000 Ach Withdrawal 2021-12-31 23:59:59
3 PAX -20000.00000000 Ach Withdrawal 2021-12-31 23:59:59
4 GUSD -1500.00000000 Ach Withdrawal 2021-12-31 23:59:59
5 BTC 0.00001234 Cc Rewards Redemption 2021-12-31 23:59:59
6 BTC 0.00000123 Cc Trading Rebate 2021-12-31 23:59:59
7 BTC 0.00010323 Bonus Payment 2021-12-31 23:59:59
8 USD -0.00000000 Ach Trade 2021-12-31 23:59:59
9 BTC 0.00000000 Ach Trade 2021-12-31 23:59:59
10 GUSD 100.00000000 Ach Deposit 2021-12-31 23:59:59
11 USDC -100.00000000 Ach Withdrawal 2021-12-31 23:59:59
12 GUSD 100.00000000 Crypto Transfer 2021-12-30 23:59:59
13 USDC -0.25000000 Withdrawal Fee 2021-12-31 23:59:59
14 USDC -199.99000000 Withdrawal 2021-12-31 23:59:59
15 GUSD -0.00000000 Trade 2021-12-31 23:59:59
16 PAX 0.00000000 Trade 2021-12-31 23:59:59
17 BTC -0.00000000 Trade 2021-12-31 23:59:59
18 GUSD 0.00000000 Trade 2021-12-31 23:59:59
19 BTC -0.00000000 Trade 2021-12-31 23:59:59
20 PAX 0.00000000 Trade 2021-12-31 23:59:59
21 BTC -0.02000000 Withdrawal 2021-12-31 23:59:59
22 USDC -123.45000000 Withdrawal 2021-12-31 23:59:59
23 BTC 0.01234567 Interest Payment 2021-12-31 23:59:59
24 USDC 12.34567890 Interest Payment 2021-12-31 23:59:59
25 PAX 12.34567890 Interest Payment 2021-12-31 23:59:59
26 GUSD 12.34567890 Interest Payment 2021-12-31 23:59:59

View File

@@ -0,0 +1,9 @@
Trade ID,Date,Buy Quantity,Buy Currency,Sold Quantity,Sold Currency,Rate Amount,Rate Currency,Type,Frequency,Destination
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8,2022-07-31 23:59:59,123.00000000,pax,123.00000000,usdc,1.00000000,pax,Trade,One Time,Wallet
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7,2021-12-31 23:59:59,23304.62634204,gusd,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6,2021-12-31 23:59:59,23304.62634204,pax,0.49382716,btc,47191.86838984,usd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5,2021-12-31 23:59:59,0.00211900,btc,100.0000,usd,47191.86838984,usd,ACH Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4,2021-12-31 23:59:59,1234.56000000,pax,1234.56000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3,2020-12-31 23:59:59,250.00000000,gusd,0.01234567,btc,28837.28852896,gusd,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2,2020-12-31 23:59:59,100.00000000,pax,100.00000000,gusd,1.00000000,pax,Trade,One Time,Interest Account
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1,2020-12-31 23:59:59,500.00000000,usdc,0.02469134,btc,28837.28852896,usdc,Trade,One Time,Interest Account
1 Trade ID Date Buy Quantity Buy Currency Sold Quantity Sold Currency Rate Amount Rate Currency Type Frequency Destination
2 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX8 2022-07-31 23:59:59 123.00000000 pax 123.00000000 usdc 1.00000000 pax Trade One Time Wallet
3 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX7 2021-12-31 23:59:59 23304.62634204 gusd 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
4 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX6 2021-12-31 23:59:59 23304.62634204 pax 0.49382716 btc 47191.86838984 usd Trade One Time Interest Account
5 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX5 2021-12-31 23:59:59 0.00211900 btc 100.0000 usd 47191.86838984 usd ACH Trade One Time Interest Account
6 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX4 2021-12-31 23:59:59 1234.56000000 pax 1234.56000000 gusd 1.00000000 pax Trade One Time Interest Account
7 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX3 2020-12-31 23:59:59 250.00000000 gusd 0.01234567 btc 28837.28852896 gusd Trade One Time Interest Account
8 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX2 2020-12-31 23:59:59 100.00000000 pax 100.00000000 gusd 1.00000000 pax Trade One Time Interest Account
9 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX1 2020-12-31 23:59:59 500.00000000 usdc 0.02469134 btc 28837.28852896 usdc Trade One Time Interest Account

View File

@@ -0,0 +1,17 @@
Cryptocurrency,Amount,Transaction Type,Confirmed At
BTC,0.00001234,Cc Rewards Redemption,2022-07-31 23:59:59
BTC,0.00000123,Cc Trading Rebate,2022-07-31 23:59:59
BTC,-0.20500000,Withdrawal,2022-07-31 23:59:59
BTC,0.20500000,BIA Withdraw,2022-07-31 23:59:59
USDC,-2965.00000000,Ach Withdrawal,2022-07-31 23:59:59
USDC,2965.00000000,BIA Withdraw,2022-07-31 23:59:59
GUSD,-3300.00000000,Ach Withdrawal,2022-07-31 23:59:59
GUSD,3300.00000000,BIA Withdraw,2022-07-31 23:59:59
PAX,-4500.00000000,Ach Withdrawal,2022-07-31 23:59:59
PAX,4500.00000000,BIA Withdraw,2022-07-31 23:59:59
USDC,-0.00000000,Trade,2022-07-31 23:59:59
PAX,0.00000000,Trade,2022-07-31 23:59:59
BTC,0.00001234,Interest Payment,2022-07-31 23:59:59
PAX,1.23456789,Interest Payment,2022-07-31 23:59:59
GUSD,1.23456789,Interest Payment,2022-07-31 23:59:59
USDC,1.23456789,Interest Payment,2022-07-31 23:59:59
1 Cryptocurrency Amount Transaction Type Confirmed At
2 BTC 0.00001234 Cc Rewards Redemption 2022-07-31 23:59:59
3 BTC 0.00000123 Cc Trading Rebate 2022-07-31 23:59:59
4 BTC -0.20500000 Withdrawal 2022-07-31 23:59:59
5 BTC 0.20500000 BIA Withdraw 2022-07-31 23:59:59
6 USDC -2965.00000000 Ach Withdrawal 2022-07-31 23:59:59
7 USDC 2965.00000000 BIA Withdraw 2022-07-31 23:59:59
8 GUSD -3300.00000000 Ach Withdrawal 2022-07-31 23:59:59
9 GUSD 3300.00000000 BIA Withdraw 2022-07-31 23:59:59
10 PAX -4500.00000000 Ach Withdrawal 2022-07-31 23:59:59
11 PAX 4500.00000000 BIA Withdraw 2022-07-31 23:59:59
12 USDC -0.00000000 Trade 2022-07-31 23:59:59
13 PAX 0.00000000 Trade 2022-07-31 23:59:59
14 BTC 0.00001234 Interest Payment 2022-07-31 23:59:59
15 PAX 1.23456789 Interest Payment 2022-07-31 23:59:59
16 GUSD 1.23456789 Interest Payment 2022-07-31 23:59:59
17 USDC 1.23456789 Interest Payment 2022-07-31 23:59:59

View File

@@ -0,0 +1,20 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include ../../blockfi-shared.rules
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1 @@
../../blockfi-shared.bash