create account

Calculating my yesterday's earnings on Steem in JavaScript by organduo

View this thread on: hive.blogpeakd.comecency.com
· @organduo ·
$1.14
Calculating my yesterday's earnings on Steem in JavaScript
Most of us here on Steem have been earning multiple tokens thanks to Steem Engine tribes for a while now. Some people have been investing, some - mining, some - earning through engagement and curation and some - all of these combinations (I'm one of them).

Some tokens have been rewarded more than others and it was interesting for me to look what they are worth today.

How much have I earned on the Steem blockchain yesterday in terms of USD value?

So today I took a look at the statistics at the notifications and here's what I found out. I've been using a script for auto claiming, transferring to my alt accounts and staking those tokens that @contrabourdon has created and notifications have been coming to my email inbox.

So yesterday I earned (in the order the notifications came in) 1.691 SP, 31 PAL, 8 LEO, 439 NEOXAG, 548 CCC, 10 SPORTS, 2 STEM, 22 LEO, 1563 NEOXAG, 173 CCC, 7 SONIC, 162 SPORTS, 0.068 SP. 26 PAL, 8 LEO, 690 NEOXAG, 220 CCC, 23 SONIC, 0.95 STEM and 0.888 SP. For the sake of the clarity, I only used the round numbers of most tokens so my earnings are actually a little bit higher.

First, let's convert them to USD according to the current prices on the Steem Engine.

1 PAL is $0.04816
1 LEO is $0.01581
1 NEOXAG is $0.00489
1 CCC is $0.00657
1 SPORTS is $0.00034
1 SONIC is $0.00965
1 STEM is $0.02166
1 STEEM is $0.194

I set up the values of different tokens in JavaScript. Later I caught myself that I should have used small letters for token symbols as variables in JavaScript but I didn't want to go back and repeat this process again because apparently Chrome Developer Tools don't allow for editing past entries (I apologize for this and will try to be more careful in the future):

![image.png](https://files.steempeak.com/file/steempeak/organduo/ueg8BwJX-image.png)

And then I calculated the exact earnings this way:

![image.png](https://files.steempeak.com/file/steempeak/organduo/pHkpt67q-image.png)

Now I need to add the earnings to have total value in USD:

![image.png](https://files.steempeak.com/file/steempeak/organduo/Hy22KPIe-image.png)

There you have it - I earned $23.883297 USD worth of STEEM and various Steem Engine tokens yesterday from posting, curation and mining. Not bad considering we are in this bear market and I didn't use any promotion tools and bid bods for my posts. Looks like NEOXAG, CCC and PAL are giving me the most return on investment at the moment. This is to be expected because I'm mining NEOXAG and CCC plus using neoxian, creativecoin and palnet on most of my posts.

Even more importantly, I got to reinforce my beginner JavaScript skills.

What do you think? Any suggestions I could put JavaScript to use here even further?
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 38 others
properties (23)
authororganduo
permlinkcalculating-my-yesterday-s-earnings-on-steem-in-javascript
categorysteemleo
json_metadata{"app":"steempeak/1.14.12","format":"markdown","tags":["steemleo","palnet","neoxian","marlians","investment","steemengine","earning","tribes","stem"],"users":["contrabourdon"],"links":["/@contrabourdon"],"image":["https://files.steempeak.com/file/steempeak/organduo/ueg8BwJX-image.png","https://files.steempeak.com/file/steempeak/organduo/pHkpt67q-image.png","https://files.steempeak.com/file/steempeak/organduo/Hy22KPIe-image.png"]}
created2019-08-11 18:58:15
last_update2019-08-11 18:58:15
depth0
children8
last_payout2019-08-18 18:58:15
cashout_time1969-12-31 23:59:59
total_payout_value0.892 HBD
curator_payout_value0.246 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,712
author_reputation241,344,590,388,394
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,412,953
net_rshares3,481,520,480,054
author_curate_reward""
vote details (102)
@bwar ·
$0.02
I've been looking at starting to track my profits each day measured against my investment.  I earn quite a bit from mining but I also dumped a lot of Steem into it.  I want understand just how much return I really am getting for my investment and then also try to see just how fast that return is diminishing.
πŸ‘  ,
properties (23)
authorbwar
permlinkre-organduo-pw4t17
categorysteemleo
json_metadata{"tags":["steemleo"],"app":"steempeak/1.14.15"}
created2019-08-12 16:12:45
last_update2019-08-12 16:12:45
depth1
children2
last_payout2019-08-19 16:12:45
cashout_time1969-12-31 23:59:59
total_payout_value0.016 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length309
author_reputation47,142,050,410,809
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,445,016
net_rshares63,761,668,766
author_curate_reward""
vote details (2)
@organduo ·
$0.02
The problem with such tracking is that Steem Engine coins both earned and mined come from the account "tokens" and right now I don't know of any way to really determine the ROI of the mining coins.

Posted using [Partiko Android](https://partiko.app/referral/organduo)
πŸ‘  
properties (23)
authororganduo
permlinkorganduo-re-bwar-re-organduo-pw4t17-20190812t201516496z
categorysteemleo
json_metadata{"app":"partiko","client":"android"}
created2019-08-12 20:15:18
last_update2019-08-12 20:15:18
depth2
children1
last_payout2019-08-19 20:15:18
cashout_time1969-12-31 23:59:59
total_payout_value0.016 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length268
author_reputation241,344,590,388,394
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,452,178
net_rshares65,216,968,315
author_curate_reward""
vote details (1)
@bwar ·
$0.03
I would lump them together, I think my only coin that would really be out of whack would be PAL.
πŸ‘  ,
properties (23)
authorbwar
permlinkre-organduo-pw55mx
categorysteemleo
json_metadata{"tags":["steemleo"],"app":"steempeak/1.14.12"}
created2019-08-12 20:45:00
last_update2019-08-12 20:45:00
depth3
children0
last_payout2019-08-19 20:45:00
cashout_time1969-12-31 23:59:59
total_payout_value0.026 HBD
curator_payout_value0.008 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation47,142,050,410,809
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,453,038
net_rshares102,604,165,524
author_curate_reward""
vote details (2)
@javirid ·
$0.02
You could also have defined a new variable for every holding, instead of using the interactive way. The result would have been the same and you would have not noticed any improvement, but:

1. You have just learnt the concept of variables. It is better to use them every time you could, even if it looks a silly usage.
2. You will later or sooner be using a debugger. Assigning values to variables will help you detect problems in your code.
πŸ‘  , ,
properties (23)
authorjavirid
permlinkre-organduo-pw37ku
categorysteemleo
json_metadata{"tags":["steemleo"],"app":"steempeak/1.14.12"}
created2019-08-11 19:31:45
last_update2019-08-11 19:31:45
depth1
children1
last_payout2019-08-18 19:31:45
cashout_time1969-12-31 23:59:59
total_payout_value0.016 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length441
author_reputation2,920,643,344,921
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,413,713
net_rshares65,775,983,953
author_curate_reward""
vote details (3)
@organduo ·
I see what you mean! An obvious choice for next exercise... Thank you!

Posted using [Partiko Android](https://partiko.app/referral/organduo)
πŸ‘  
properties (23)
authororganduo
permlinkorganduo-re-javirid-re-organduo-pw37ku-20190811t193942416z
categorysteemleo
json_metadata{"app":"partiko","client":"android"}
created2019-08-11 19:39:42
last_update2019-08-11 19:39:42
depth2
children0
last_payout2019-08-18 19:39: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_length141
author_reputation241,344,590,388,394
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,413,893
net_rshares60,979,993
author_curate_reward""
vote details (1)
@partiko ·
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!
properties (22)
authorpartiko
permlinkre-calculating-my-yesterday-s-earnings-on-steem-in-javascript-20190813t093134
categorysteemleo
json_metadata"{"app": "partiko"}"
created2019-08-13 09:31:36
last_update2019-08-13 09:31:36
depth1
children0
last_payout2019-08-20 09:31: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_length213
author_reputation39,207,160,334,751
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,471,559
net_rshares0
@spectrumecons ·
$0.02
It's quite impressive how all these tokens add up. Imagine if the price of Steem went up to $2 and the token prices followed proportionately. You could be earning as much as $250 a day. Sounds like another good reason to invest in Steem plus tokens. Also, well done with the calculations.
πŸ‘  ,
properties (23)
authorspectrumecons
permlinkpw4gv7
categorysteemleo
json_metadata{"tags":["steemleo","stem"],"app":"stemgeeks/0.1"}
created2019-08-12 11:49:57
last_update2019-08-12 11:49:57
depth1
children1
last_payout2019-08-19 11:49:57
cashout_time1969-12-31 23:59:59
total_payout_value0.017 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length288
author_reputation352,142,349,782,539
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,435,861
net_rshares69,044,135,607
author_curate_reward""
vote details (2)
@organduo ·
Thanks! Do you think it would be wise to sell 50 percent of these other tokens for STEEM and power it up? On a day like the one I calculated with today's prices it would be 60 STEEM. 18k+ SP in a year without any fiat investment...

Posted using [Partiko Android](https://partiko.app/referral/organduo)
properties (22)
authororganduo
permlinkorganduo-re-spectrumecons-pw4gv7-20190812t155854927z
categorysteemleo
json_metadata{"app":"partiko","client":"android"}
created2019-08-12 15:58:54
last_update2019-08-12 15:58:54
depth2
children0
last_payout2019-08-19 15:58: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_length302
author_reputation241,344,590,388,394
root_title"Calculating my yesterday's earnings on Steem in JavaScript"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,444,591
net_rshares0