15

I want to know, how much rewards a specific KT1 Account earned since cycle 7.

A good Example is the "Rewards Share" Tab of TzScan. Rewards Share tab

https://tzscan.io/tz1Tnjaxk6tbAeC2TmMApPh8UsrEVQvhHvx5?default=rewards

This TzScan API call "unexpectedly" delivers the tz1 Manager Rewards.

https://api6.tzscan.io/v3/delegator_rewards_with_details/KT1BNVf6f359fNbokCKMXuKNmpzUy3Nwugyj

But I need the KT1 Rewards.

1 Answer 1

14

Unfortunately there is no way to directly query just the delegator's reward from TzScan API.

But you can easily use this API call with some extra calculations:

//This is what the baker got
var total_reward = rewards + extra_rewards - losses;

//This is the delegator's share in the staking balance
var share = balance / staking_balance;

//This is the delegator's reward (without fee, etc) for the selected cycle
var reward = total_reward * share;

Also, if you don't need the reward details, you might want to use this API call.

2
  • I would have to do this for every single cycle since cycle 7, if i understand correct (because the balance from var share = balance / staking_balance changes every cycle)? Commented Jan 30, 2019 at 7:43
  • 2
    Yep, you’re right. And not only share changes from cycle to cycle but also total_rewards.
    – Groxan
    Commented Jan 30, 2019 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.