You are viewing a single comment's thread from:

RE: Part 9: How To Calculate A Post's Total Rewards Using Steem-Python

in #utopian-io7 years ago (edited)

It's because Amount is a class in steem-python that splits a string like "10 SBD" into amount(10) and asset (SBD) as you can see here. The float() function just converts a number or a string into a float! If you really wanted you could do recent_claims = float(reward_fund["reward_balance"].split()[0]) instead, but it's easier to just use Amount class.

Sort:  

I see, thank you!
This example here shows better what is going on, nice, now I have two options!

Coin Marketplace

STEEM 0.19
TRX 0.16
JST 0.030
BTC 65765.48
ETH 2628.78
USDT 1.00
SBD 2.66