create account

steem-cointracking: Generate complete transaction history for STEEM by svk

View this thread on: hive.blogpeakd.comecency.com
· @svk ·
$119.87
steem-cointracking: Generate complete transaction history for STEEM
Tax season is upon us here in Norway, and with it comes updated guidelines for how to treat cryptocurrencies. Because of that I decided to start using [CoinTracking.info](https://cointracking.info), (which I wholeheartedly recommend), to track all of my crypto history. That worked great for BTC and Ethereum wallets and most exchanges, however for STEEM (and Bitshares) it was impossible to get a full printout of my transaction history. I did some research and found the [steem-report](https://github.com/MidnightLightning/steem-report) repo by MidnightLightning, but unfortunately it had been broken by recent changes in the Steem API, and I was unable to get it working properly.

That's why I decided to fork that repo and build my own version. That repo can be found here: [steem-cointracking](https://github.com/svk31/steem-cointracking). 

Instead of fetching data from an API server I decided to use @furion's amazing [SteemData](https://steemdata.com/) service, which allowed me to fetch all the transaction history for a given account. Once I had the data, it was a matter of parsing the various operation types properly and organizing the data, and then writing the data to a CSV file that can be imported directly into CoinTracking.info.

![](https://steemitimages.com/DQmNPVReFQLikLe56Rg7M4kz14wHqKwbAzcS7JsuGMmFJ1q/image.png)

# Usage
To use the script, simply clone the repo locally then run `npm install`. Once the modules are installed, you can run the script for your desired account:

`node app.js myaccount`

There are some additional input parameters that are explained in the README.

You'll then find a file in the `output` folder called `myaccount-steem-transactions.csv`. This file can then be imported directly into CoinTracking using their Bulk Imports > CSV Import option:

![](https://steemitimages.com/DQmdc3hk6CN9KoRW8vjCSCugoH7nCtsMGS88aYioHLvgpmm/image.png)

# Caveats
After weeks of tweaking I now have  a working script that generates a mostly correct history, but there are still some discrepancies in balances and some missing data from the Steem blockchain itself.

I've classified block production as Mining, and Author/Curation rewards as Income. You're free to change this however you like, the same goes for any of the many operation types.

I've also added grouping for many operation types, since STEEM generates an enormous amount of transactions. Most groupings are by day, for example author rewards and curation rewards.

 If you see a better way of doing things, please open an issue and let me know.

### Early mining
There are issues with the STEEM history for older accounts that participated in the initial mining phase. The producer rewards for that phase are not recorded in the current history, causing missing balances. To compensate for this, I've assigned the difference between the final balance and the actual balance to these early mining operations.

### VESTS to STEEM conversion
In order to track the actual value of VESTS, I've added bi-weekly deposits of STEEM that correspond to the current balance of VESTS. This conversion is done using a formula to calculate the steem_per_mvests ratio found here: https://steemit.com/steemdev/@holger80/how-to-estimate-historic-steempermvests-values-for-converting-old-rewards-from-vest-to-steem

I noticed that this formula broke down completely for the early mining phase, so I extracted actual values manually from the blockchain and stored them in a json file. These values were then used to interpolate a better value for early steem_per_mvests ratios.

### VESTS inaccuracies
Despite having spent a lot of time debugging the various operations and tracking down many bugs, there are still accounts where the final calculated balances are different from the actual balances. One of my accounts is a good example, `witness.svk`. This account has a large discrepancy in the final balance of MVESTS, and I've so far been unable to track down why. There may be other inaccuracies as well.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorsvk
permlinksteem-cointracking-generate-complete-transaction-history-for-steem
categorysteem
json_metadata{"tags":["steem","cointracking","tax","steemdev"],"users":["furion"],"image":["https://steemitimages.com/DQmNPVReFQLikLe56Rg7M4kz14wHqKwbAzcS7JsuGMmFJ1q/image.png","https://steemitimages.com/DQmdc3hk6CN9KoRW8vjCSCugoH7nCtsMGS88aYioHLvgpmm/image.png"],"links":["https://cointracking.info","https://github.com/MidnightLightning/steem-report","https://github.com/svk31/steem-cointracking","https://steemdata.com/","https://steemit.com/steemdev/@holger80/how-to-estimate-historic-steempermvests-values-for-converting-old-rewards-from-vest-to-steem"],"app":"steemit/0.1","format":"markdown"}
created2018-04-28 09:48:18
last_update2018-04-28 09:48:18
depth0
children13
last_payout2018-05-05 09:48:18
cashout_time1969-12-31 23:59:59
total_payout_value114.052 HBD
curator_payout_value5.821 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,995
author_reputation28,721,479,690,952
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,613,503
net_rshares18,847,239,622,277
author_curate_reward""
vote details (30)
@binam ·
very very good post🙏🙏
thank you for share post❤
properties (22)
authorbinam
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t095401001z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-28 09:54:15
last_update2018-04-28 09:54:15
depth1
children0
last_payout2018-05-05 09:54:15
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_length47
author_reputation237,005,144,905
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,614,249
net_rshares0
@dwancina ·
In future tax will be added on steem.
properties (22)
authordwancina
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t095619030z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-28 09:56:18
last_update2018-04-28 09:56:18
depth1
children0
last_payout2018-05-05 09:56: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_length37
author_reputation131,551,342,256
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,614,504
net_rshares0
@flysky ·
@svk Norway is leading country on steemit and your inputs are always welcome to community.
we will restart extremesports challenge that was supported by you a while back
your input on entire community is great influence for people who believe in steemit
properties (22)
authorflysky
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180517t220348330z
categorysteem
json_metadata{"tags":["steem"],"users":["svk"],"app":"steemit/0.1"}
created2018-05-17 22:03:54
last_update2018-05-17 22:03:54
depth1
children0
last_payout2018-05-24 22:03: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_length253
author_reputation189,012,239,854,883
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id56,262,008
net_rshares0
@guttormf ·
This would have been such a help for me now if [Steemdata hadn't been shut down](https://steemit.com/steemdata/@furion/steemdata-is-shutting-down-on-may-1st)....
properties (22)
authorguttormf
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180530t101122359z
categorysteem
json_metadata{"tags":["steem"],"links":["https://steemit.com/steemdata/@furion/steemdata-is-shutting-down-on-may-1st"],"app":"steemit/0.1"}
created2018-05-30 10:11:24
last_update2018-05-30 10:11:24
depth1
children0
last_payout2018-06-06 10:11: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_length161
author_reputation323,593,357,527
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id58,418,845
net_rshares0
@kafkajnr ·
what a great information!
tnx sir @svk for ur post.
👍  
properties (23)
authorkafkajnr
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t095350219z
categorysteem
json_metadata{"tags":["steem"],"users":["svk"],"app":"steemit/0.1"}
created2018-04-28 09:53:51
last_update2018-04-28 09:53:51
depth1
children0
last_payout2018-05-05 09:53:51
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_length51
author_reputation37,118,863,846
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,614,193
net_rshares333,019,349
author_curate_reward""
vote details (1)
@michelmake · (edited)
If only I had the skills you have! Would make life much easier! Thanks for sharing the info. I'm from the Netherlands and my crypto investments are below the threshold for taxation. Nevertheless, it's not a bad idea to start looking into things like CoinTracking.info. Thanks again.
properties (22)
authormichelmake
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180430t054536448z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-30 05:45:36
last_update2018-04-30 05:45:48
depth1
children0
last_payout2018-05-07 05:45: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_length282
author_reputation38,156,784,734,657
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,967,278
net_rshares0
@monetaryrealist ·
How will they know unless you volunteer to owe
properties (22)
authormonetaryrealist
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t095735253z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-28 09:57:39
last_update2018-04-28 09:57:39
depth1
children1
last_payout2018-05-05 09:57: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_length46
author_reputation64,006,129,536
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,614,655
net_rshares0
@svk ·
$0.05
They won't, but if you're not honest about your crypto earnings then it will most likely come back to haunt you once you start spending that income. It can also be expected that tax authorities will improve their tools and knowledge of blockchains as time goes by, which may lead to questions asked of you. My advice is to make sure you have your records in order.
👍  ,
properties (23)
authorsvk
permlinkre-monetaryrealist-re-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t100029890z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-28 10:00:30
last_update2018-04-28 10:00:30
depth2
children0
last_payout2018-05-05 10:00:30
cashout_time1969-12-31 23:59:59
total_payout_value0.034 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length364
author_reputation28,721,479,690,952
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,615,039
net_rshares7,648,849,571
author_curate_reward""
vote details (2)
@rasel49 ·
Nice informative post
properties (22)
authorrasel49
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180428t094910458z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-28 09:49:18
last_update2018-04-28 09:49:18
depth1
children0
last_payout2018-05-05 09:49: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_length21
author_reputation-344,267,664,729
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,613,610
net_rshares0
@soufiani ·
Hi there! I made this gift for you and i hooe you can give it a look and like. Thanks in advance :) https://steemit.com/@soufiani/svk-working-behind-the-scene-the-pencil-version

> ![sketch1529279930226-02.jpeg](https://ipfs.busy.org/ipfs/QmU4t5NyGdzXPEZMMpk2DqsrkFcvfVmqefFYwADyLhoUBR)
👍  
properties (23)
authorsoufiani
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180620t204841145z
categorysteem
json_metadata{"tags":["steem"],"community":"busy","app":"busy/2.4.0"}
created2018-06-20 20:48:42
last_update2018-06-20 20:48:42
depth1
children0
last_payout2018-06-27 20:48: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_length287
author_reputation76,196,638,053,322
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id61,544,234
net_rshares4,455,523,924
author_curate_reward""
vote details (1)
@steembottrackerr ·
<center>https://steemitimages.com/200x200/https://s-media-cache-ak0.pinimg.com/originals/81/28/3c/81283c6aed7bdb5b9f8ad73b8ce62c2f.jpg</center>
---
<center>Hello @svk , Congratulations ✅ . Your content began to appear in the hot section.
I am the information account of "SteemBotTracker" site.
</center>
---
<center>
Your Informations
Total SBD: 0.003
Total STEEM: 1820.27
</center>
---
<center>
I recommend to increase this;
You can make "Resteem" and advertise to the followers of the whale accounts.
"Resteem Bot" for you;
✅ The most profitable Resteem Whale @byresteem  has 25.500 Followers + 7000 Sp + Upvote with min +55 accounts. 
</center>
---
<center>
You can purchase "upvote" by bid bots.
"Upvote Bot"
✅ The most profitable whale in the last round. @upme
</center>
---
<center>
I'm taking this message once. You need to use the #steembottrackerr tag for more information.
Those who "upvote" this interpretation will be awarded a "UpVote" prize of 100 Sbd per week per person.
I am a bot, I can not answer the comment. I hope I could help. Good luck. Sorry if I disturbed you.
</center>
properties (22)
authorsteembottrackerr
permlink20180506t103346169z
categorysteem
json_metadata{"tags":["advice"],"app":"steemjs/test"}
created2018-05-06 10:33:48
last_update2018-05-06 10:33:48
depth1
children0
last_payout2018-05-13 10:33: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_length1,125
author_reputation-1,493,369,324,060
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id54,175,416
net_rshares0
@steemitboard ·
Congratulations @svk! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@svk/birthday3.png</td><td>Happy Birthday! - You are on the Steem blockchain for 3 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@svk) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=svk)_</sub>


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-svk-20190404t101720000z
categorysteem
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-04-04 10:17:21
last_update2019-04-04 10:17:21
depth1
children0
last_payout2019-04-11 10:17: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_length599
author_reputation38,975,615,169,260
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,467,624
net_rshares0
@torbjorns ·
Kanskje jeg skal sjekke ut cointracking.info, har enda ikke forsøkt å omgjøre steem til NOK, er det i det hele tatt sikkert? eller er det fare for å bli svindlet på en måte?
properties (22)
authortorbjorns
permlinkre-svk-steem-cointracking-generate-complete-transaction-history-for-steem-20180429t234441309z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-04-29 23:44:42
last_update2018-04-29 23:44:42
depth1
children0
last_payout2018-05-06 23:44: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_length173
author_reputation682,075,081,029
root_title"steem-cointracking: Generate complete transaction history for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,920,355
net_rshares0