Comment interroger des récompenses d'un compte KT1 spécifique?
1 réponses
- votes
-
- 2019-01-29
Malheureusement,iln'estpasmoyen dene pasinterroger directement la récompense de la délégatrice de Tzscan API.
Mais vouspouvezfacilement utiliser Cet appel d'API avec des calculs supplémentaires:
//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;
Également,si vousn'avezpasbesoin de détails de récompense,vouspouvez utiliser Cet appel de l'API.
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.
-
Je devrais lefairepour chaque cycle depuis le cycle 7,sije comprendsbien (car labalance de Var Share=Balance/Stainting_balance change chaque cycle)?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)?
- 0
- 2019-01-30
- Blindripper
-
Oui,tu as raison.Etnon seulement `Share` change de cycle au cyclemais aussi`total_rewards`.Yep, you’re right. And not only `share` changes from cycle to cycle but also `total_rewards`.
- 2
- 2019-01-30
- Groxan
Je veux savoir,combien de récompense un compte KT1 spécifiquegagné depuis le cycle 7.
Unbonexempleest l'onglet "Action de récompense" de TZScan.
https://tzscan.io/tz1tnjaxk6tbaec2tmmapph8USRevqvhhvx5?default=rewards
Cet appel de l'API TZScan "demanièreinattendue"fournit les récompenses dugestionnaire TZ1.
Maisj'aibesoin des récompenses KT1.