How to make your Piston bot skip 'declined payout'-postssteemCreated with Sketch.

in #piston-lib7 years ago (edited)

@cryptofunk asked this under my last post and I think some of you might want to use this.

To spot a post with declined payout you can check the max_accepted_payout parameter for the post. With c being the post, this would look like this:

Check:

if str(Amount(c['max_accepted_payout']))  == '0.000 SBD':

For this to work, you need to import the Amount function from the piston-lib library like this:

from piston.amount import Amount

There are probably cleaner ways to check this, but if you (like myself) learned some basic Python just for Piston, this should be an easy method.


Fun fact:

By default the max_accepted_payout is 1000000.000 SBD

Yes, that's 1 million SBD.



Good luck with your bot !

@felixxx

Sort:  

Thanks a lot for the help, there may come a time in the future when the million dollar payout will be reached.

I was curious how to check for declined payouts, too.

My own bot follows the behavior of a group of users - I don't really need this function.

Even with a lot of optimism: I doubt the million will ever be reached :D

@felixxx did you just combine cryptofunk and pfunks name? :D
oh - that's an evidence that I read :D
congrats for helping !

cryptoFunk !!
:D
corrected.

Your English skills are powered up :)

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.031
BTC 69345.27
ETH 3816.44
USDT 1.00
SBD 3.67