create account

Script to create a CSV file with all financial transactions (i.e. for tax purposes) by pharesim

View this thread on: hive.blogpeakd.comecency.com
· @pharesim ·
$51.78
Script to create a CSV file with all financial transactions (i.e. for tax purposes)
My accountant asked me for a list of transactions on Hive. I searched a bit, but didn't find anything that could help with that, so I wrote a script to create a CSV file.

https://github.com/pharesim/hive_tx_to_csv/

<center>
![data aggregation](https://files.peakd.com/file/peakd-hive/pharesim/245w8y2AsVWL7HGBSgQeU6j99teWBY2vN9VTiDEcA3uAz5HDNKAATmACvWFhz3NUFyghN.webp)
</center>

Thanks to @mahdiyari's HAFSQL it's possible to convert VESTS to HP using the ratio at the time, which was the biggest issue in this project. It's all simple and straight forward, all you need is python with beem and pandas. 

Download the file, edit the parameters on top with the account you want to get the data for and the start and end date. Be aware that it can take a long time to run, as it has to iterate through all transactions in the specified timeframe. The preset is hbdstabilizer with about 1700 transactions in one day, which takes a little over 2 minutes on my system. Getting a year's worth of data for my own account took about 4 hours. If you're not a witness it'll probably be a lot quicker.

First I thought about creating a paid service, but free is better ;) Please open a ticket or comment here if you encounter any issues.

Enjoy, and if you consider my work useful please drop me a witness vote!
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 429 others
properties (23)
authorpharesim
permlinkscript-to-create-a-csv-file-with-all-financial-transactions-ie-for-tax-purposes
categoryhive-139531
json_metadata{"app":"peakd/2024.8.6","format":"markdown","tags":["hive","transactions","accounting","taxes"],"users":["mahdiyari"],"image":["https://files.peakd.com/file/peakd-hive/pharesim/245w8y2AsVWL7HGBSgQeU6j99teWBY2vN9VTiDEcA3uAz5HDNKAATmACvWFhz3NUFyghN.webp"]}
created2024-08-22 23:09:21
last_update2024-08-22 23:09:21
depth0
children32
last_payout2024-08-29 23:09:21
cashout_time1969-12-31 23:59:59
total_payout_value25.910 HBD
curator_payout_value25.866 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,303
author_reputation239,352,620,843,716
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,469,495
net_rshares191,741,276,942,966
author_curate_reward""
vote details (493)
@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 @pardinus 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-script-to-create-a-csv-file-with-all-financial-transactions-ie-for-tax-purposes-20240822t234048489z
categoryhive-139531
json_metadata{"app":"beerlover/3.0","language":"rust","developer":"wehmoen"}
created2024-08-22 23:40:48
last_update2024-08-22 23:40:48
depth1
children0
last_payout2024-08-29 23:40: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_length521
author_reputation25,761,421,138,206
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,469,878
net_rshares0
@dobro2020 ·
Niceee i would like do the same in javascript 
properties (22)
authordobro2020
permlinkre-pharesim-2024822t224242100z
categoryhive-139531
json_metadata{"content_type":"general","type":"comment","tags":["hive-139531","hive","transactions","accounting","taxes"],"app":"ecency/3.1.5-mobile","format":"markdown+html"}
created2024-08-23 01:42:42
last_update2024-08-23 01:42:42
depth1
children0
last_payout2024-08-30 01:42:42
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_length46
author_reputation65,342,077,586,891
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,471,347
net_rshares0
@edina76 ·
Vielen Dank! Deine Version mit Github überstieg meinen technischen Verständniss, aber die waivio-Seite konnte ich gut nutzen! Genau das, was ich suchte. Vielen Dank fürs Teilen!
properties (22)
authoredina76
permlinkre-pharesim-srqlww
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2025.2.3","image":[],"users":[]}
created2025-02-15 18:26:54
last_update2025-02-15 18:26:54
depth1
children0
last_payout2025-02-22 18:26:54
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_length177
author_reputation43,801,270,070,253
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,813,233
net_rshares0
@hive.helps ·
Great thank you. Will test it after my vacation. Good that people invest their time and effort to help the community. 
properties (22)
authorhive.helps
permlinkre-pharesim-siov0i
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 20:45:48
last_update2024-08-23 20:45:48
depth1
children0
last_payout2024-08-30 20:45: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_length118
author_reputation34,141,636,746,765
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,489,166
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/replies.png?202408230304"></td><td>You got more than 7000 replies.<br>Your next target is to reach 7250 replies.</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-1724382462
categoryhive-139531
json_metadata{"image":["https://hivebuzz.me/notify.t6.png"]}
created2024-08-23 03:07:42
last_update2024-08-23 03:07:42
depth1
children0
last_payout2024-08-30 03:07:42
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_length623
author_reputation369,197,217,943,406
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,472,220
net_rshares0
@hivebuzz ·
Congratulations @pharesim! You received a personal badge!

<table><tr><td>https://images.hive.blog/70x70/https://hivebuzz.me/badges/hivefest-9.s5.png?202409201440</td><td>HiveFest 9 Attendee</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>
properties (22)
authorhivebuzz
permlinknotify-1726844405
categoryhive-139531
json_metadata{"image":["https://hivebuzz.me/notify.t6.png"]}
created2024-09-20 15:00:06
last_update2024-09-20 15:00:06
depth1
children0
last_payout2024-09-27 15:00:06
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_length372
author_reputation369,197,217,943,406
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id137,228,655
net_rshares0
@holdonla ·
$0.15
Thank you very much. It works great.
👍  
properties (23)
authorholdonla
permlinkre-pharesim-skgq3c
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.7"}
created2024-09-27 08:26:00
last_update2024-09-27 08:26:00
depth1
children0
last_payout2024-10-04 08:26:00
cashout_time1969-12-31 23:59:59
total_payout_value0.076 HBD
curator_payout_value0.076 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation47,464,467,397,162
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id137,448,765
net_rshares561,549,162,859
author_curate_reward""
vote details (1)
@latinowinner ·
we should consider to go temporarily to tax crypto heavens like Vanuatu or El salvador
properties (22)
authorlatinowinner
permlinkre-pharesim-2024823t11024663z
categoryhive-139531
json_metadata{"tags":["hive","transactions","accounting","taxes"],"app":"ecency/3.2.0-vision","format":"markdown+html"}
created2024-08-23 01:00:24
last_update2024-08-23 01:00:24
depth1
children0
last_payout2024-08-30 01:00:24
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_length86
author_reputation2,806,502,129,785
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,470,844
net_rshares0
@oblivioncubed ·
$0.03
Fantastic! There is an option on the wavio UI that lets you download a bunch of transactions as well but it requires some editing to work with something like... Koinly or whatever that tax service is.
👍  
properties (23)
authoroblivioncubed
permlinkre-pharesim-sin9hs
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 00:03:30
last_update2024-08-23 00:03:30
depth1
children2
last_payout2024-08-30 00:03:30
cashout_time1969-12-31 23:59:59
total_payout_value0.016 HBD
curator_payout_value0.017 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length200
author_reputation168,954,521,354,471
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,470,160
net_rshares127,659,962,565
author_curate_reward""
vote details (1)
@pharesim ·
Very interesting, thanks for sharing. I didn't check out Koinly yet, but will soon probably. I assume that platform works better with all individual transactions like waivio outputs it. My script aggregates the data into fewer rows so my accountant doesn't get a heart attack. Unfortunately it's missing the producer rewards there, which are of course very important for me. 

Good to have different tools available to fit different needs! 
To save those interested some googling work, here's a link:
https://www.waivio.com/@hbdstabilizer/transfers/table
properties (22)
authorpharesim
permlinkre-oblivioncubed-sina4y
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 00:17:24
last_update2024-08-23 00:17:24
depth2
children1
last_payout2024-08-30 00:17:24
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_length554
author_reputation239,352,620,843,716
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,470,362
net_rshares0
@oblivioncubed ·
Thanks for adding the link! I meant to but it's difficult with a 4 week old napping on me 😂
properties (22)
authoroblivioncubed
permlinkre-pharesim-sinaf7
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 00:23:30
last_update2024-08-23 00:23:30
depth3
children0
last_payout2024-08-30 00:23:30
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_length91
author_reputation168,954,521,354,471
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,470,408
net_rshares0
@pardinus ·
This seems incredibly useful, thanks a ton for sharing! !BEER
properties (22)
authorpardinus
permlinkre-pharesim-sin8fs
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-22 23:40:39
last_update2024-08-22 23:40:39
depth1
children0
last_payout2024-08-29 23:40: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_length61
author_reputation378,515,499,733,692
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,469,875
net_rshares0
@ratel ·
Oh, it's a very useful tool! Need it, I added in the bookmarks. 
properties (22)
authorratel
permlinkre-pharesim-2024823t93043884z
categoryhive-139531
json_metadata{"tags":["hive","transactions","accounting","taxes"],"app":"ecency/3.2.0-vision","format":"markdown+html"}
created2024-08-23 02:30:45
last_update2024-08-23 02:30:45
depth1
children0
last_payout2024-08-30 02:30: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_length64
author_reputation718,439,179,586,955
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,471,778
net_rshares0
@sanjeevm ·
I have not tried to do any work on calculating my earnings in hive, because, in actual, unless I convert them and take to my bank account, it's not earned, isn't that right ?
properties (22)
authorsanjeevm
permlinkre-pharesim-sioery
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 14:55:12
last_update2024-08-23 14:55:12
depth1
children3
last_payout2024-08-30 14:55:12
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_length174
author_reputation673,709,868,747,685
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,481,488
net_rshares0
@pharesim ·
Depends on where you live, but most countries tax crypos same as stocks or other assets by now.
properties (22)
authorpharesim
permlinkre-sanjeevm-siof3q
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 15:02:18
last_update2024-08-23 15:02:18
depth2
children2
last_payout2024-08-30 15:02: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_length95
author_reputation239,352,620,843,716
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,481,635
net_rshares0
@sanjeevm ·
Ya, even my country does impose a 30% tax, but unless you convert to fiat, its not our earnings, isn't it ? 
properties (22)
authorsanjeevm
permlinkre-pharesim-sioj3t
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-23 16:28:42
last_update2024-08-23 16:28:42
depth3
children1
last_payout2024-08-30 16:28:42
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_length108
author_reputation673,709,868,747,685
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,483,073
net_rshares0
@sircork · (edited)
Nice one. People seem to be responding to this really well. I'm jelly compared to how hard it is to get eyes and project supporting upvotes on the things I am building and posting updates about. :P 

Are you going to publish this on public facing tools site anywhere? My public free hive tools server is just a little vps with some php apps on it and my big server for hivestreams.live is very purpose built for laravel, react and node, and is all tied up in being the rtmp streaming server so its not good for a tools site loading up the ram with big chain pulls either. 

But this seems like something you could slap keychain on, ask for a username and spit out pretty PDFs for people without too much effort, and I am sure the community would love it if you did. Github, python and beem and APIs and RPCs and web services, are sort of an advanced class for the typical account holder around here after all, I bet the crowd would love an easy button for this. 

Granted it, as you said, is load heavy, but it seems feasible to productize it. People who have big money tax concerns would probably pay a few hive for a pretty printing report too. maybe paywall it to cover the ram and cpu. 

Just up from a day sleep after coding on my own projects for like 24 hours straight to solve and rush features out, and drinking coffee and spitballing here about ideas for this very useful tool you made. 
properties (22)
authorsircork
permlinkre-pharesim-sipmmg
categoryhive-139531
json_metadata{"tags":"hive-139531"}
created2024-08-24 06:42:18
last_update2024-08-24 06:42:57
depth1
children14
last_payout2024-08-31 06:42: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_length1,397
author_reputation40,884,085,696,666
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,495,669
net_rshares0
@pharesim ·
> Nice one. People seem to be responding to this really well. I'm jelly compared to how hard it is to get eyes and project supporting upvotes on the things I am building and posting updates about. :P

I'm a little surprised too, but even more that nobody did it before. How's everyone been keeping their books?

Your suggestion with the webinterface and pay to download was what I meant saying I thought about a paid service. But for now I got a long enough backlog with some missing wiki functions, and hiveinvite _really_ needs a complete overhaul. 
Selling stuff also comes with further complications like VAT and possible liabilities. Maybe at a later stage, if the community starts growing again at some point it might be worth it. 
I wouldn't mind someone else sets that up in the meantime though. 
👍  
properties (23)
authorpharesim
permlinkre-sircork-sipt4j
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-24 09:02:54
last_update2024-08-24 09:02:54
depth2
children13
last_payout2024-08-31 09:02:54
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_length804
author_reputation239,352,620,843,716
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,496,941
net_rshares7,045,474,121
author_curate_reward""
vote details (1)
@sircork ·
I don't know python well and I am starting to immerse in my own pile of to-dos and user requests for what I am building already but I should know python, I started making money in the industy with Perl in 1990 or so, and did PHP for a couple decades now, and a couple other stacks I am at least basically literate in enough to get an app up, but never picked up Python for some reason. Probably because coming from PHP it didn't really offer me much more that I needed. I am not a data scientist and that's where python seems really strong, industry wise. 

But I hear you on selling stuff. I have no idea how I am going to "sell" anything for HiveStreams.Live, or how I will fund it's operations. I am taking the "Uber" approach. Build a thing, figure out how to make money with it later, maybe, hopefully, somehow. Cause SirCork gets soo hungry when he's broke. :) 
properties (22)
authorsircork
permlinkre-pharesim-sipthp
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2024.8.6"}
created2024-08-24 09:10:36
last_update2024-08-24 09:10:36
depth3
children12
last_payout2024-08-31 09:10:36
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_length867
author_reputation40,884,085,696,666
root_title"Script to create a CSV file with all financial transactions (i.e. for tax purposes)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id136,497,027
net_rshares0