create account

Transaction history CSV file generator 2.0 (for your yearly tax reports) by pharesim

View this thread on: hive.blogpeakd.comecency.com
· @pharesim · (edited)
$33.98
Transaction history CSV file generator 2.0 (for your yearly tax reports)
@louis88 had been playing around with GitHub's Copilot and @mahdiyari's [public HafSQL database](https://peakd.com/hive-139531/@mahdiyari/public-hafsql-database-on-haf) to figure out [the retention rate and general efficiency of onboarding programs](https://peakd.com/hive-139531/@louis88/having-fun-with-data-13k-mau-i-dont-know), which I watched him stream on Discord. 

This made me want to create a hafsql version of the [hive_tx_to_csv](https://peakd.com/hive-139531/@pharesim/script-to-create-a-csv-file-with-all-financial-transactions-ie-for-tax-purposes) script using the same tools. After a lot of prompting the AI, waiting for results and test-runs, and fixing quite a lot of ridiculous mistakes, I ended up with a [working version](https://github.com/pharesim/hive_tx_to_csv/blob/main/hive_tx_to_csv_hafsql.py).

<center>![](https://images.hive.blog/p/NTy4GV6ooFRmaCXZ8UYgPhoud1kjiNX8QokLEZtbBKLuLWQ9yt7K3o4S6eC2WcnS9KkBw4dQazCQtHKyHFKQwm3iwphG9cqgQaUvZfpRjAw8rmJFsTd6cwr4NCkVq9W5LZSCT7BK5f4h4ubeXhn9jxxCEodmBNPJtsLjZdJ7?width=800&height=600&format=webp&mode=fit)</center>

The big benefit of using SQL is that it's a lot faster. Get a whole year's report in a matter of seconds or minutes.
The downside is that it relies on the availability of trustworthy public SQL nodes.
Both scripts are kept up-to-date (just added HBD interest payments for example), choose what suits your needs best.
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 212 others
๐Ÿ‘Ž  
properties (23)
authorpharesim
permlinktransaction-history-csv-file-generator-20-for-your-yearly-tax-reports
categoryhive-139531
json_metadata"{"app":"peakd/2025.1.3","description":"hafsql version of the hive_tx_to_csv script","format":"markdown","image":["https://images.hive.blog/p/NTy4GV6ooFRmaCXZ8UYgPhoud1kjiNX8QokLEZtbBKLuLWQ9yt7K3o4S6eC2WcnS9KkBw4dQazCQtHKyHFKQwm3iwphG9cqgQaUvZfpRjAw8rmJFsTd6cwr4NCkVq9W5LZSCT7BK5f4h4ubeXhn9jxxCEodmBNPJtsLjZdJ7?width=800&amp;height=600&amp;format=webp&amp;mode=fit"],"tags":["hive","transactions","accounting","taxes"],"users":["louis88","mahdiyari","pharesim"]}"
created2025-01-15 17:11:36
last_update2025-01-15 17:28:12
depth0
children17
last_payout2025-01-22 17:11:36
cashout_time1969-12-31 23:59:59
total_payout_value17.014 HBD
curator_payout_value16.962 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,402
author_reputation239,450,405,799,183
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,025,627
net_rshares66,634,670,671,525
author_curate_reward""
vote details (277)
@antisocialist ·
Taxation is theft.
properties (22)
authorantisocialist
permlinkre-pharesim-sq567v
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 18:04:45
last_update2025-01-15 18:04:45
depth1
children3
last_payout2025-01-22 18:04:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18
author_reputation276,970,284,490,149
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,027,062
net_rshares0
@pharesim ·
$0.13
Doesn't matter what the armed robber wants from you, it's always better to give it up and continue living your life in peace.
๐Ÿ‘  , ,
๐Ÿ‘Ž  
properties (23)
authorpharesim
permlinkre-antisocialist-sq56ux
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 18:18:36
last_update2025-01-15 18:18:36
depth2
children2
last_payout2025-01-22 18:18:36
cashout_time1969-12-31 23:59:59
total_payout_value0.064 HBD
curator_payout_value0.064 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length125
author_reputation239,450,405,799,183
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,027,275
net_rshares256,166,502,846
author_curate_reward""
vote details (4)
@antisocialist ·
!lolz
Yeah, if you don't mind being bled by vampires that might be a good strategy, otherwise, you might want to fight.
If you never say no to your gov't, you got to expect it to take all you allow.

Guns and ammo for everybody.โ„ข
https://archive.org/details/combatsurvivalweaponsimprovisedkurtsaxonhowtobuildthefourwindsshotgun
properties (22)
authorantisocialist
permlinkre-pharesim-sq59fs
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 19:14:18
last_update2025-01-15 19:14:18
depth3
children1
last_payout2025-01-22 19:14:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length327
author_reputation276,970,284,490,149
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,028,601
net_rshares0
@beerlover ·
<div class='pull-right'>https://files.peakd.com/file/peakd-hive/beerlover/yiuU6bdf-beerlover20gives20BEER.gif<p><sup><a href='https://hive-engine.com/?p=market&t=BEER'>View or trade </a> <code>BEER</code>.</sup></p></div><center><br> <p>Hey @pharesim, here is a little bit of <code>BEER</code> from @reiseamateur for you. Enjoy it!</p> <p>Did you know that <a href='https://dcity.io/city</b>you can use <b>BEER</b> at dCity game</a> to buy cards to rule the world.</p> </center><div></div>
properties (22)
authorbeerlover
permlinkre-pharesim-transaction-history-csv-file-generator-20-for-your-yearly-tax-reports-20250118t205148095z
categoryhive-139531
json_metadata{"app":"beerlover/3.0","language":"rust","developer":"wehmoen"}
created2025-01-18 20:51:48
last_update2025-01-18 20:51:48
depth1
children0
last_payout2025-01-25 20:51:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length490
author_reputation25,851,316,436,857
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,108,082
net_rshares0
@doombot75 ·
$0.05
Thanks for the link @steevc, had just started looking into hivesql link to excel

Nice work @pharesim 
๐Ÿ‘  
properties (23)
authordoombot75
permlinkre-pharesim-sq5don
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":["steevc","pharesim"]}
created2025-01-15 20:45:57
last_update2025-01-15 20:45:57
depth1
children0
last_payout2025-01-22 20:45:57
cashout_time1969-12-31 23:59:59
total_payout_value0.024 HBD
curator_payout_value0.024 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length102
author_reputation15,403,582,661,160
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,030,579
net_rshares94,840,445,073
author_curate_reward""
vote details (1)
@godfish ·
It's sad many of us will likely need such tool :/
properties (22)
authorgodfish
permlinkre-pharesim-2025115t191039424z
categoryhive-139531
json_metadata{"tags":["hive","transactions","accounting","taxes"],"app":"ecency/4.0.2-vision","format":"markdown+html"}
created2025-01-15 18:10:39
last_update2025-01-15 18:10:39
depth1
children0
last_payout2025-01-22 18:10:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation750,169,729,586,026
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,027,145
net_rshares0
@hivebuzz ·
Congratulations @pharesim! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

<table><tr><td><img src="https://images.hive.blog/60x70/https://hivebuzz.me/@pharesim/upvotes.png?202503211127"></td><td>You distributed more than 660000 upvotes.<br>Your next target is to reach 670000 upvotes.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@pharesim) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>

properties (22)
authorhivebuzz
permlinknotify-1742556519
categoryhive-139531
json_metadata{"image":["https://hivebuzz.me/notify.t6.png"]}
created2025-03-21 11:28:39
last_update2025-03-21 11:28:39
depth1
children0
last_payout2025-03-28 11:28:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length635
author_reputation369,467,085,732,598
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id141,583,454
net_rshares0
@oblivioncubed ·
$0.06
Very timely! I haven't taken a deep look because my work is going crazy right now, but what's the difference between hive_tx_to_csv.py and hive_tx_to_csv_hafsql.py - is it just down to the public node that it's using?
๐Ÿ‘  
properties (23)
authoroblivioncubed
permlinkre-pharesim-sq544q
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 17:19:39
last_update2025-01-15 17:19:39
depth1
children2
last_payout2025-01-22 17:19:39
cashout_time1969-12-31 23:59:59
total_payout_value0.032 HBD
curator_payout_value0.032 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length217
author_reputation169,444,846,475,310
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,025,792
net_rshares127,668,585,819
author_curate_reward""
vote details (1)
@pharesim ·
$0.04
See the last paragraph. hafsql uses a SQL database, the base version queries the blockchain directly.
๐Ÿ‘  
properties (23)
authorpharesim
permlinkre-oblivioncubed-sq54ds
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3"}
created2025-01-15 17:25:06
last_update2025-01-15 17:25:06
depth2
children1
last_payout2025-01-22 17:25:06
cashout_time1969-12-31 23:59:59
total_payout_value0.020 HBD
curator_payout_value0.020 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length101
author_reputation239,450,405,799,183
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,025,914
net_rshares80,416,318,467
author_curate_reward""
vote details (1)
@oblivioncubed ·
Very cool, that makes sense. I was just reading through the actual files too as you were making this comment and had figured that out. I appreciate the reply!
properties (22)
authoroblivioncubed
permlinkre-pharesim-sq54g9
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 17:26:33
last_update2025-01-15 17:26:33
depth3
children0
last_payout2025-01-22 17:26:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length158
author_reputation169,444,846,475,310
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,025,974
net_rshares0
@reiseamateur · (edited)
Servus @pharesim , auch @louis88 , 
Betreff: https://hiveinvite.com/

Leider funktioniert das onborden mit E-mail scheinbar nicht:

![error.jpg](https://images.hive.blog/DQmZgpLPS43Dfy25dCcao4X63YWfzDvMLcj4hrQqZhsFXno/error.jpg)

Die Einladung hat mein Sohn versendet: @sportsvote :


![grafik.png](https://images.hive.blog/DQmZTmV7kNZ7mwdrj7m4TVueBQ87S9VNsPb3xv84ScJhbma/grafik.png)

Bis heute keine Email beim betreffenden eingelangt....
und morgen endet die Einladung...
lg mit nem BEER chen ๐Ÿค 
properties (22)
authorreiseamateur
permlinksqaxy2
categoryhive-139531
json_metadata{"app":"hiveblog/0.1","image":["https://images.hive.blog/DQmZgpLPS43Dfy25dCcao4X63YWfzDvMLcj4hrQqZhsFXno/error.jpg","https://images.hive.blog/DQmZTmV7kNZ7mwdrj7m4TVueBQ87S9VNsPb3xv84ScJhbma/grafik.png"],"links":["https://hiveinvite.com/"],"users":["pharesim","louis88","sportsvote"]}
created2025-01-18 20:51:39
last_update2025-01-18 20:52:30
depth1
children4
last_payout2025-01-25 20:51:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length496
author_reputation261,149,359,310,773
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,108,075
net_rshares0
@pharesim ·
$0.10
Emails waren kaputt da der hoster รผberraschend die ports geblockt hatte. Seit Montag sind die aber wieder offen, ich habe gerade eine Einladung erstellt und die Mail kam sofort. Am besten du lรถschst die Einladung und erstellst einfach eine neue.
๐Ÿ‘  
properties (23)
authorpharesim
permlinkre-reiseamateur-sqb1s4
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-18 22:14:30
last_update2025-01-18 22:14:30
depth2
children3
last_payout2025-01-25 22:14:30
cashout_time1969-12-31 23:59:59
total_payout_value0.050 HBD
curator_payout_value0.051 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length245
author_reputation239,450,405,799,183
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,109,444
net_rshares186,394,967,288
author_curate_reward""
vote details (1)
@beerlover ·
<div class='pull-right'>https://files.peakd.com/file/peakd-hive/beerlover/yiuU6bdf-beerlover20gives20BEER.gif<p><sup><a href='https://hive-engine.com/?p=market&t=BEER'>View or trade </a> <code>BEER</code>.</sup></p></div><center><br> <p>Hey @pharesim, here is a little bit of <code>BEER</code> from @isnochys for you. Enjoy it!</p> <p>Learn how to <a href='https://peakd.com/beer/@beerlover/what-is-proof-of-stake-with-beer'>earn <b>FREE BEER</b> each day </a> by staking your <code>BEER</code>.</p> </center><div></div>
properties (22)
authorbeerlover
permlinkre-pharesim-re-reiseamateur-sqb1s4-20250120t221533348z
categoryhive-139531
json_metadata{"app":"beerlover/3.0","language":"rust","developer":"wehmoen"}
created2025-01-20 22:15:33
last_update2025-01-20 22:15:33
depth3
children0
last_payout2025-01-27 22:15:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length521
author_reputation25,851,316,436,857
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,164,761
net_rshares0
@isnochys ·
Thank you for your [witness vote](https://hivesigner.com/sign/account-witness-vote?witness=isnochys&approve=1)!
 Have a !BEER on me!
To Opt-Out of my witness beer program just comment STOP below
properties (22)
authorisnochys
permlinkre-re-reiseamateur-sqb1s4-20250120t221517z
categoryhive-139531
json_metadata"{"app": "beem/0.24.26"}"
created2025-01-20 22:15:21
last_update2025-01-20 22:15:21
depth3
children0
last_payout2025-01-27 22:15:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length194
author_reputation47,792,708,906,508
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,164,754
net_rshares0
@reiseamateur ·
Danke!
Machen wir...
Lg ๐Ÿค 
properties (22)
authorreiseamateur
permlinkre-pharesim-2025119t12358139z
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"ecency/4.0.2-vision","format":"markdown+html"}
created2025-01-19 11:35:09
last_update2025-01-19 11:35:09
depth3
children0
last_payout2025-01-26 11:35:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length26
author_reputation261,149,359,310,773
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,120,352
net_rshares0
@steevc ·
Interesting. Someone was asking on Brits Discord about how to generate details for the taxman. I was looking at the UK tax and crypto trading falls under capital gains. You can earn earn up to ยฃ3000 before you need to pay tax. I need to see what it includes. A lot of us 'earn' $HIVE, but does that count as mining? The tax man may only notice when you convert to fiat and I've not done that in a while.
๐Ÿ‘  
properties (23)
authorsteevc
permlinkre-pharesim-sq55fw
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.1.3","image":[],"users":[]}
created2025-01-15 17:47:57
last_update2025-01-15 17:47:57
depth1
children0
last_payout2025-01-22 17:47:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length403
author_reputation1,402,715,027,869,806
root_title"Transaction history CSV file generator 2.0 (for your yearly tax reports)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,026,719
net_rshares3,990,354,972
author_curate_reward""
vote details (1)