How to calculate STEEM power from VESTS
steemit·@hmushtaq·
0.000 HBDHow to calculate STEEM power from VESTS
Approximately a month ago, I made a post about a Python program I wrote that can tell you the real worth of your Steemit account in BTC and dollars (https://steemit.com/steemit/@hmushtaq/a-python-program-to-calculate-the-real-worth-of-your-steemit-account). This is because the equivalent dollar amount shown in your Steemit wallet is not based on the current price of STEEM and SBD.  [image source](https://steemitimages.com/DQmao7eUaWAKRqtcGa9Vh3NPxK8ZYsntASSfkESqSkt3m4J/image.png) However, that program suffers from the problem that you need to feed it the amount of your STEEM and SBD yourself. If you look at the comments in that post, @krenter gave a solution where you can get the total worth by just taking the username as input. However, his approach still doesn't take the STEEM power into account. That is because the json output gives STEEM power in the form of VESTS. For example, in my case, the relevant part comes out like this. >vesting_shares: 1366357.116663 VESTS So, how can I get my STEEM power from this in the program? Well, its simple, I will additionally just have to crawl the [steemd.com](https://steemd.com/) page where the value of _steem_per_mvests_ is listed, which is _489.282_ at the moment. I am sure that there is also a direct way of getting that value by looking inside the Steemit blockchain, but for the moment this method would do :) Now to calculate a user's STEEM power, I would simply have to multiply that user's vesting_shares with _steem_per_mvests_ and then divide the product by a million. So, basically the following formula. >vesting_shares * steem_per_mvests / 1e6 In my case, this would be >1366357.116663 * 489.282 / 1e6 Which comes out to be nearly 669 STEEM power, which is also shown by my Steemit wallet. I'll soon update my Python program to calculate the total worth of a user's account in BTC and fiat (dollars or user's currency of choice), with my program only taking the username as input. Once I finish its implementation, I will post a tutorial of it. So, stay tuned!
👍 hmushtaq, cyprianj, jacksartori, astrizak, herbertholmes, communicasound, sagarthukral, jtthefoodie, leoumesh, tapanbk, liquidtravel, irfanullah, ghostiee, pagandance, indraperdanaok, putra-muda, twodollars, ranakhan, technolotrade, ayeshairfan, msp-bidbot, mercurybot, therising, aksdwi, jdorame, cryptoraxer,