I'm playing with the latest Python-Steem release. I made this little script, that adds up all my curation rewards, ever. I'm using the Account.history function to list the rewards. When I add them all up, the number doesn't match the _curation_rewards_ as shown by Account.export. ___ ## Code from steem import Steem steem = Steem(node="wss://node.steem.ws") #issues with this.piston.rocks atm from steem.account import Account from steem.amount import Amount account = Account("felixxx") reward_sum = 0 for event in account.history(filter_by='curation_reward'): reward = Amount(event['reward']).amount link = event['comment_permlink'] #print(account.converter.vests_to_sp(reward), ' SP for ', link) reward_sum += reward print('reward (in vest): ', reward_sum) reward_sum = account.converter.vests_to_sp(reward_sum) print('reward (in sp): ', reward_sum) curation = (account.export()['curation_rewards']/1000) print('curation according to Account.export (in sp): ', curation) ## Result http://i.imgur.com/EdgBgdD.png ### Shouldn't those numbers be identical ?
author | felixxx |
---|---|
permlink | question-about-python-steem-real-curation-rewards |
category | python |
json_metadata | {"tags":["python","pysteem","python-steem","steemd","curation"],"image":["http://i.imgur.com/EdgBgdD.png"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-01-23 13:05:00 |
last_update | 2017-01-23 13:05:00 |
depth | 0 |
children | 12 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.379 HBD |
curator_payout_value | 0.055 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,150 |
author_reputation | 220,515,515,553,875 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 2,320,514 |
net_rshares | 6,408,020,816,718 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
wang | 0 | 151,367,472,713 | 47% | ||
proctologic | 0 | 60,265,982,440 | 100% | ||
proctologic2 | 0 | 1,043,298,827 | 100% | ||
makishart | 0 | 10,839,445,019 | 100% | ||
proctologic3 | 0 | 823,277,420 | 100% | ||
richman | 0 | 121,850,410,997 | 100% | ||
juanmiguelsalas | 0 | 51,223,261,865 | 100% | ||
skapaneas | 0 | 15,586,706,030 | 100% | ||
ericvancewalton | 0 | 828,205,182,841 | 100% | ||
heiditravels | 0 | 370,057,903,770 | 100% | ||
slowwalker | 0 | 689,232,547,397 | 100% | ||
bycz | 0 | 16,629,994,593 | 100% | ||
lichtblick | 0 | 145,656,776,789 | 100% | ||
me-tarzan | 0 | 145,438,308,117 | 100% | ||
fiveboringgames | 0 | 84,416,029,188 | 100% | ||
febird | 0 | 13,593,482,690 | 100% | ||
rockymtnbarkeep | 0 | 2,054,878,041 | 100% | ||
raymonjohnstone | 0 | 8,596,644,593 | 100% | ||
moon32walker | 0 | 101,691,488,605 | 100% | ||
ace108 | 0 | 25,066,851,055 | 85% | ||
uwe69 | 0 | 17,911,873,924 | 100% | ||
shortcut | 0 | 86,458,222,106 | 100% | ||
ap2002 | 0 | 106,234,200 | 100% | ||
felixxx | 0 | 67,428,124,984 | 100% | ||
dumar022 | 0 | 54,080,079,881 | 100% | ||
twinner | 0 | 1,086,163,350,994 | 100% | ||
germansailor | 0 | 2,704,975,689 | 100% | ||
elena000 | 0 | 306,394,302 | 100% | ||
gargon | 0 | 127,287,054,955 | 100% | ||
pgarcgo | 0 | 98,663,981,653 | 100% | ||
wartrapa | 0 | 37,419,438,080 | 100% | ||
herbertmueller | 0 | 2,390,924,655 | 100% | ||
ioc | 0 | 746,095,832,179 | 100% | ||
gammagooblin | 0 | 7,807,861,234 | 100% | ||
abarefootpoet | 0 | 8,495,306,789 | 100% | ||
neptun | 0 | 417,546,813,939 | 100% | ||
albagargon | 0 | 838,803,712 | 100% | ||
nang1 | 0 | 636,918,812 | 100% | ||
andrewawerdna | 0 | 35,974,981,038 | 100% | ||
onetree | 0 | 53,654,266,798 | 100% | ||
ines-f | 0 | 7,558,822,524 | 100% | ||
alktoni | 0 | 6,046,178,391 | 100% | ||
englishtchrivy | 0 | 76,537,627,470 | 100% | ||
stephenkendal | 0 | 10,928,905,211 | 100% | ||
titin | 0 | 47,242,704,569 | 100% | ||
gsdalex | 0 | 59,948,868 | 100% | ||
jsg | 0 | 57,757,695,298 | 100% | ||
z3r0d4yz | 0 | 1,303,047,469 | 100% | ||
saamychristen | 0 | 7,572,870,489 | 100% | ||
jgcastrillo19 | 0 | 61,834,077,936 | 100% | ||
nelyp | 0 | 26,918,064,106 | 100% | ||
dirkzett | 0 | 246,999,853,550 | 100% | ||
juliamateo | 0 | 2,260,337,399 | 100% | ||
bestofreddit | 0 | 3,923,999,674 | 100% | ||
drac59 | 0 | 1,347,287,868 | 100% | ||
teo | 0 | 2,937,133,916 | 100% | ||
opmonis | 0 | 827,931,983 | 100% | ||
dresden | 0 | 40,336,897,745 | 90% | ||
alfredozofio | 0 | 3,300,876,252 | 100% | ||
freiheit50 | 0 | 20,331,390,137 | 100% | ||
beers | 0 | 16,570,319,822 | 100% | ||
dulcinea | 0 | 3,790,468,677 | 100% | ||
unityofmulti | 0 | 1,962,101,571 | 100% | ||
steemspeak | 0 | 225,892,299 | 2% | ||
lovethepeople | 0 | 135,764,678 | 100% | ||
whiskylover | 0 | 2,840,622,772 | 100% | ||
porco-bastardo | 0 | 131,925,089 | 100% | ||
xer | 0 | 1,470,102,772 | 21% | ||
trans-juanmi | 0 | 6,589,301,800 | 60% | ||
steemer0815 | 0 | 871,235,864 | 100% | ||
gas7uazz | 0 | 690,058,606 | 100% | ||
cardboard | 0 | 6,558,031,887 | 100% | ||
juliosalas | 0 | 832,198,110 | 60% | ||
little-peppers | 0 | 10,440,627,555 | 100% | ||
nik69 | 0 | 105,521,247 | 100% | ||
dzone | 0 | 30,938,841,896 | 100% | ||
fisteganos | 0 | 2,230,768,304 | 100% | ||
no0balot | 0 | 0 | 100% |
sorry, cannot help don't understand but i'm wondering if you know there's steemsql.com
author | ace108 |
---|---|
permlink | re-felixxx-question-about-python-steem-real-curation-rewards-20170123t144626964z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 14:40:00 |
last_update | 2017-01-23 14:40:00 |
depth | 1 |
children | 2 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 86 |
author_reputation | 1,246,544,653,859,061 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,321,213 |
net_rshares | 0 |
https://steemit.com/steemdata/@furion/introducing-steemdata-a-database-layer-for-steem Yes, it's great. I'm not that far, yet, though. I will have to look into it. For now, I'm still trying to figure out what I can do just with Python-Steem.
author | felixxx |
---|---|
permlink | re-ace108-re-felixxx-question-about-python-steem-real-curation-rewards-20170123t144513219z |
category | python |
json_metadata | {"tags":["python"],"links":["https://steemit.com/steemdata/@furion/introducing-steemdata-a-database-layer-for-steem"],"app":"steemit/0.1"} |
created | 2017-01-23 14:45:12 |
last_update | 2017-01-23 14:45:12 |
depth | 2 |
children | 1 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 243 |
author_reputation | 220,515,515,553,875 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,321,256 |
net_rshares | 0 |
OK, i tried to learn python a while back up to some beginner stage but didn't continue. Was hoping this SQL thing will be easier. Trying to figure it out.
author | ace108 |
---|---|
permlink | re-felixxx-re-ace108-re-felixxx-question-about-python-steem-real-curation-rewards-20170123t145432635z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 14:48:03 |
last_update | 2017-01-23 14:48:03 |
depth | 3 |
children | 0 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 154 |
author_reputation | 1,246,544,653,859,061 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,321,273 |
net_rshares | 0 |
I think its converting your reward in vests to SP at the current rate vest to SP conversion rate in the first one. In the second one, its using the SP value of your vests when you actually got the reward. remember, the SP->vest conversion rate changes over time (though not as much since the hardfork) So imagine you got 1M vests worth 100SP when the conversion rate was 1M vests=100SP. Monest later, the conversion rate is 1Mvests=200SP Its going to show your reward in vests as 1 million vests. In the first line, its going to convert that 1M vests at the current rate of 1M vests=200SP. But on the other line, its going to look at the SP value of the vests when you got them. EDIT -- missed that felixxx already came up with the same answer
author | sigmajin |
---|---|
permlink | re-felixxx-question-about-python-steem-real-curation-rewards-20170123t153047614z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 15:30:45 |
last_update | 2017-01-23 15:36:33 |
depth | 1 |
children | 0 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 753 |
author_reputation | 35,847,511,233,614 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,321,536 |
net_rshares | 144,297,131,755 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
sigmajin | 0 | 54,616,058,101 | 100% | ||
felixxx | 0 | 66,085,162,778 | 100% | ||
steevc | 0 | 23,595,910,876 | 100% |
Seems too big a difference for a rounding error, but do rewards always get rounded down to three decimal places?
author | steevc |
---|---|
permlink | re-felixxx-question-about-python-steem-real-curation-rewards-20170123t130946429z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 13:09:45 |
last_update | 2017-01-23 13:09:45 |
depth | 1 |
children | 7 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 112 |
author_reputation | 1,411,705,335,565,487 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,320,548 |
net_rshares | 0 |
If it's too little it gets rounded down to 0 - Other than that I'm not sure.
author | felixxx |
---|---|
permlink | re-steevc-re-felixxx-question-about-python-steem-real-curation-rewards-20170123t131953388z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 13:19:51 |
last_update | 2017-01-23 13:19:51 |
depth | 2 |
children | 6 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 76 |
author_reputation | 220,515,515,553,875 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,320,641 |
net_rshares | 25,785,972,657 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
steevc | 0 | 25,785,972,657 | 100% |
Can you sum up those that would get rounded to nothing? I really want to play with stuff like this, but haven't found time. Posts like this give me ideas.
author | steevc |
---|---|
permlink | re-felixxx-re-steevc-re-felixxx-question-about-python-steem-real-curation-rewards-20170123t132150617z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2017-01-23 13:21:51 |
last_update | 2017-01-23 13:21:51 |
depth | 3 |
children | 5 |
last_payout | 2017-02-23 14:25:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 154 |
author_reputation | 1,411,705,335,565,487 |
root_title | "Question about Python-Steem: real curation rewards ?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,320,660 |
net_rshares | 0 |