## Repository https://github.com/holgern/beem
![beem-logo](https://cdn.steemitimages.com/DQmcRrwLPSywSYMierfP6um6mejeMNGjN9Rxw7audJqTDgb/beem-logo)
[beem](https://github.com/holgern/beem) is a python library for STEEM and HIVE. The current version is 0.22.12. There is also a discord channel for beem: https://discord.gg/4HM592V The newest beem version can be installed by: ``` pip install -U beem ``` Check that you are using hive nodes. The following command ``` beempy updatenodes --hive ``` updates the nodelist and uses only hive nodes. The list of nodes can be checked with ``` beempy config ``` and ``` beempy currentnode ``` shows the currently connected node. ## Changelog for versions 0.22.12 This update fixed the Vote classes, curation/author reward calculation, Discussions classes and get_feed and get_account_votes for Accounts. * Add hive node * get_feed uses now discussion_by_feed * get_account_votes has been fixed * ActiveVotes has been fixed * Discussions has been fixed * raw_data parameter added to all discussions * beempy curation, beempy votes and beempy pending has been fixed * Votes table improved * fix curation and author reward calculation ## Fixing all integration tests After fixing the remaining problems in vote, comment and account, all 462 tests have finally passed. ``` ========== 462 passed, 27 skipped, 13 warnings in 1551.63s (0:25:51) =========== The CI may fail from time to time due to node time outs. ``` ## View outgoing and incoming votes with beempy Outgoing votes can be checked with ``` beempy votes -o -d 1 holger80 ``` ``` +----------+------------------+---------+--------------+---------------+---------+--------+ | Voter | Votee | SBD/HBD | Time | Rshares | Percent | Weight | +----------+------------------+---------+--------------+---------------+---------+--------+ | holger80 | pibara | 1.0 $ | 0 days 23:9 | 2348837832917 | 7500 | 911136 | | holger80 | pennsif | 1.34 $ | 0 days 21:17 | 3123742413620 | 9955 | 390108 | | holger80 | nonameslefttouse | 1.08 $ | 0 days 18:45 | 2517726726913 | 8000 | 323940 | | holger80 | gtg | 1.4 $ | 0 days 12:17 | 3279925264141 | 10000 | 281332 | | holger80 | quochuy | 1.39 $ | 0 days 10:42 | 3259050022456 | 10000 | 216722 | | holger80 | steemcleaners | 0.68 $ | 0 days 10:30 | 1599714528677 | 5000 | 358546 | | holger80 | dsound | 1.03 $ | 0 days 9:30 | 2396854864854 | 7500 | 238509 | | holger80 | abitcoinskeptic | 1.35 $ | 0 days 8:49 | 3167311773888 | 10000 | 847601 | | holger80 | jga | 0.68 $ | 0 days 6:6 | 1590352821718 | 5000 | 151064 | | holger80 | creary | 0.34 $ | 0 days 5:50 | 789079645344 | 2500 | 317630 | | holger80 | muelli | 0.68 $ | 0 days 4:50 | 1584677025773 | 5000 | 364432 | | holger80 | emrebeyler | 1.01 $ | 0 days 4:28 | 2360837888866 | 7500 | 649503 | | holger80 | denmarkguy | 0.57 $ | 0 days 3:20 | 1331770685831 | 4251 | 377530 | | holger80 | inertia | 1.02 $ | 0 days 0:40 | 2386404162091 | 7500 | 256582 | | holger80 | stellabelle | 0.94 $ | 0 days 0:34 | 2195712375512 | 7000 | 524304 | +----------+------------------+---------+--------------+---------------+---------+--------+ ``` where d limit the shown days. Incoming votes can be seen with ``` beempy votes -i -d 1 holger80 ``` ``` +---------------+----------+---------+--------------+---------------+---------+--------+ | Voter | Votee | SBD/HBD | Time | Rshares | Percent | Weight | +---------------+----------+---------+--------------+---------------+---------+--------+ | kaymay | holger80 | 0.0 $ | 0 days 23:54 | 138492921 | 10000 | 7 | | barton26 | holger80 | 0.01 $ | 0 days 23:4 | 18413631854 | 10000 | 936 | | dhimmel | holger80 | 2.0 $ | 0 days 18:59 | 4675461211716 | 10000 | 235183 | | joey-fancy | holger80 | 0.0 $ | 0 days 17:3 | 5993194991 | 10000 | 298 | | cubapl | holger80 | 0.0 $ | 0 days 12:52 | 3051877392 | 10000 | 152 | | steemcleaners | holger80 | 1.13 $ | 0 days 10:0 | 2646991658036 | 5000 | 130928 | | saboin | holger80 | 0.16 $ | 0 days 8:36 | 367812173322 | 4500 | 18068 | | netuoso | holger80 | 0.33 $ | 0 days 2:39 | 765623609156 | 10000 | 38036 | | memehub | holger80 | 1.15 $ | 0 days 2:5 | 2685197932823 | 10000 | 132357 | | crokkon | holger80 | 0.02 $ | 0 days 1:57 | 40344164439 | 10000 | 1977 | | dustsweeper | holger80 | 0.04 $ | 0 days 1:36 | 89501844457 | 2000 | 4393 | +---------------+----------+---------+--------------+---------------+---------+--------+ ``` ## Pending rewards This command can be used for calculating pending rewards for posts, comments and votes. The conversion to USD is done by using the latest internal market price for HIVE/HBD and the 7 day median price for HIVE/USD. Pending rewards from posts can be shown by ``` beempy pending --post holger80 ``` ``` +----------+-----------+-----------+------------+--------------+ | Cashout | HBD | HP | Liquid USD | Invested USD | +----------+-----------+-----------+------------+--------------+ | 4.0 days | 16.389 | 84.044 | 14.06 $ | 16.39 $ | | 0.9 days | 16.347 | 83.830 | 14.02 $ | 16.35 $ | | | | | | | | Sum | 32.74 HBD | 167.87 HP | 28.08 $ | 32.74 $ | +----------+-----------+-----------+------------+--------------+ ``` `--author`, `--permlink` or `--title` can be set to show more information. The `--days` parameter limits the shown duration in days and `--from` sets the start point in days. The curation rewards from before 6 to 7 days can be viewed by (this call takes a while): ``` beempy pending --curation --author --from 6 --days 1 holger80 ``` ``` Showing pending curation rewards for @holger80 +-----------------+----------+----------+----------+------------+--------------+ | Author | Cashout | HBD | HP | Liquid USD | Invested USD | +-----------------+----------+----------+----------+------------+--------------+ | anthonyadavisii | 0.9 days | 0.000 | 3.953 | 0.00 $ | 0.77 $ | | arcange | 0.9 days | 0.000 | 2.708 | 0.00 $ | 0.53 $ | | denmarkguy | 0.9 days | 0.000 | 4.148 | 0.00 $ | 0.81 $ | | anomadsoul | 0.8 days | 0.000 | 5.438 | 0.00 $ | 1.06 $ | | exhaust | 0.7 days | 0.000 | 1.819 | 0.00 $ | 0.35 $ | | bluerobo | 0.7 days | 0.000 | 3.372 | 0.00 $ | 0.66 $ | | therealwolf | 0.7 days | 0.000 | 9.194 | 0.00 $ | 1.79 $ | | markkujantunen | 0.6 days | 0.000 | 2.717 | 0.00 $ | 0.53 $ | | steemcleaners | 0.6 days | 0.000 | 4.727 | 0.00 $ | 0.92 $ | | moon32walker | 0.6 days | 0.000 | 2.043 | 0.00 $ | 0.40 $ | | stateofthedapps | 0.5 days | 0.000 | 1.780 | 0.00 $ | 0.35 $ | | nateaguila | 0.5 days | 0.000 | 4.630 | 0.00 $ | 0.90 $ | | jrvacation | 0.5 days | 0.000 | 3.617 | 0.00 $ | 0.71 $ | | eonwarped | 0.3 days | 0.000 | 2.591 | 0.00 $ | 0.51 $ | | steemillu | 0.1 days | 0.000 | 1.760 | 0.00 $ | 0.34 $ | | hiq | 0.1 days | 0.000 | 5.430 | 0.00 $ | 1.06 $ | | fullnodeupdate | 0.0 days | 0.000 | 1.585 | 0.00 $ | 0.31 $ | | yabapmatt | 0.0 days | 0.000 | 3.789 | 0.00 $ | 0.74 $ | | therealwolf | 0.0 days | 0.000 | 1.144 | 0.00 $ | 0.22 $ | | | | | | | | | Sum | - | 0.00 HBD | 66.44 HP | 0.00 $ | 12.96 $ | +-----------------+----------+----------+----------+------------+--------------+ ``` The given values are only estimate, e.g. for `@therealwolf/dhive` 1.144 HP was estimated, but received 0.927 HP. ![image.png](https://files.peakd.com/file/peakd-hive/holger80/McNvkk31-image.png) The pending curation rewards from the last 24 h can be viewed by ``` beempy pending --curation --author --from 0 --days 1 holger80 ``` `--comment` can be used to view pending reward on comments. ## Curation performance for a given permlink The curation performance can be calculated by curation for pending and already paid-out posts. The following command shows the curation performance of voter `holger80` on `@therealwolf/dhive`. ``` beempy curation -a holger80 @therealwolf/dhive ``` ``` +------------+-------------+------------+-----------------+-----------+-------------+ | Voter | Voting time | Vote | Early vote loss | Curation | Performance | +------------+-------------+------------+-----------------+-----------+-------------+ | holger80 | 27.4 min | 0.328 HBD | 0.000 HBD | 0.926 HP | 55.0 % | | | | | | | | | High. vote | 688.7 min | 10.198 HBD | 0.000 HBD | 21.750 HP | 41.6 % | | High. Cur. | 4.3 min | 0.104 HBD | 0.014 HBD | 0.909 HP | 170.1 % | | Sum | - | 36.675 HBD | 0.514 HBD | 86.581 HP | 45.97 % | +------------+-------------+------------+-----------------+-----------+-------------+` ``` The performance percentage is calculated by dividing the received Hive Power through the vote value in HIVE. The curation performance of all votes with a value higher than 0.2 HBD can be checked with ``` beempy curation --min-vote 0.2 @therealwolf/dhive ``` ``` +-----------------+-------------+------------+-----------------+-----------+-------------+ | Voter | Voting time | Vote | Early vote loss | Curation | Performance | +-----------------+-------------+------------+-----------------+-----------+-------------+ | karja | 3.9 min | 0.223 HBD | 0.051 HBD | 1.875 HP | 164.2 % | | oflyhigh | 4.5 min | 1.969 HBD | 0.217 HBD | 11.331 HP | 112.2 % | | deanliu | 4.5 min | 1.077 HBD | 0.108 HBD | 5.063 HP | 91.7 % | | helene | 4.5 min | 0.518 HBD | 0.052 HBD | 2.140 HP | 80.6 % | | xiaohui | 4.5 min | 0.394 HBD | 0.035 HBD | 1.535 HP | 76.0 % | | russia-btc | 17.1 min | 0.241 HBD | 0.000 HBD | 0.938 HP | 75.9 % | | yabapmatt | 17.9 min | 2.006 HBD | 0.000 HBD | 6.731 HP | 65.4 % | | holger80 | 27.4 min | 0.328 HBD | 0.000 HBD | 0.926 HP | 55.0 % | | lunaticpandora | 58.0 min | 0.391 HBD | 0.000 HBD | 0.985 HP | 49.2 % | | solarwarrior | 58.1 min | 0.634 HBD | 0.000 HBD | 1.509 HP | 46.4 % | | diggndeeper.com | 64.1 min | 0.473 HBD | 0.000 HBD | 0.990 HP | 40.9 % | | fredrikaa | 80.0 min | 0.739 HBD | 0.000 HBD | 1.445 HP | 38.1 % | | braaiboy | 80.0 min | 0.259 HBD | 0.000 HBD | 0.482 HP | 36.3 % | | asgarth | 149.3 min | 0.825 HBD | 0.000 HBD | 1.415 HP | 33.4 % | | good-karma | 375.8 min | 0.702 HBD | 0.000 HBD | 1.110 HP | 30.8 % | | therealwolf | 688.7 min | 10.198 HBD | 0.000 HBD | 21.750 HP | 41.6 % | | nextcolony | 763.6 min | 0.209 HBD | 0.000 HBD | 0.361 HP | 33.7 % | | steemik | 1247.0 min | 0.737 HBD | 0.000 HBD | 1.248 HP | 33.0 % | | smartsteem | 6575.2 min | 7.220 HBD | 0.000 HBD | 10.606 HP | 28.6 % | | tombstone | 6575.3 min | 3.967 HBD | 0.000 HBD | 4.824 HP | 23.7 % | | epicdice | 6575.3 min | 0.246 HBD | 0.000 HBD | 0.319 HP | 25.3 % | | | | | | | | | High. vote | 688.7 min | 10.198 HBD | 0.000 HBD | 21.750 HP | 41.6 % | | High. Cur. | 4.3 min | 0.104 HBD | 0.014 HBD | 0.909 HP | 170.1 % | | Sum | - | 36.675 HBD | 0.514 HBD | 86.581 HP | 45.97 % | +-----------------+-------------+------------+-----------------+-----------+-------------+ ``` This works also for pending posts. The `--min-vote` parameter influences now the shown highest curation. This is useful, as low votes can have high curation performance, which cannot archived with higher votes. I can see that the vote optimum is around 4.2 minutes for votes higher than 0.4 HBD. ``` beempy curation -a holger80 --min-vote 0.4 @emrebeyler/dpoll-beneficiary-update ``` ``` curation for @emrebeyler/dpoll-beneficiary-update +------------+-------------+------------+-----------------+-----------+-------------+ | Voter | Voting time | Vote | Early vote loss | Curation | Performance | +------------+-------------+------------+-----------------+-----------+-------------+ | holger80 | 5.1 min | 1.008 HBD | 0.000 HBD | 4.497 HP | 87.0 % | | | | | | | | | High. vote | 201.6 min | 12.492 HBD | 0.000 HBD | 22.977 HP | 35.9 % | | High. Cur. | 4.2 min | 0.507 HBD | 0.081 HBD | 2.760 HP | 106.2 % | | Sum | - | 16.314 HBD | 0.159 HBD | 38.316 HP | 45.76 % | +------------+-------------+------------+-----------------+-----------+-------------+ ``` *** *If you like what I do, consider casting a vote for me as witness on [Hivesigner](https://hivesigner.com.com/sign/account-witness-vote?witness=holger80&approve=1) or on [PeakD](https://peakd.com/witnesses)*.

See: Update for beem: fixing author/curation reward calculation and more by @holger80

More About Python