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)
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
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Seems too big a difference for a rounding error, but do rewards always get rounded down to three decimal places?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
If it's too little it gets rounded down to 0 - Other than that I'm not sure.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
If they resulted in nothing they shouldn't have ended up in the Account.history as a transaction in the first place. (?)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I assume the curation_rewards from steemd got added up in SP ( at the value it had at the time )
The rewards I gathered were in VESTS and i converted them at the current rate ...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
lol missed the response and just typed the same thing.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Ah, that could be it. Can you compare amounts in Vests? I'm still trying to understand Vests vs Steem.
Looks like you're using Ubuntu
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
SteemPower has an interest rate - VESTS don't.
If I stopped getting rewards, my VESTS would stay the same, while they would be worth more Steem over time.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
sorry, cannot help don't understand but i'm wondering if you know there's steemsql.com
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit