0

I want to get reward amount for specific pool for specific epoch.

https://docs.blockfrost.io/#tag/Cardano-Pools/paths/~1pools~1%7Bpool_id%7D~1history/get

Above blockfrost api provides reward amount for specific epoch.

But for private pool, all rewards become margin, since its margin percent is 100%, so all rewards show as 0 in api response.

To get reward amount for private pool, I need to get margin amount.

How can I get margin amount for specific pool for specific epoch?

1 Answer 1

1

The rewards should show in the Blockfrost API, are you sure you're not looking at first epoch that did not participate in staking yet?

As example, here is one of the eToros' pools that has 100% margin:

$ curl -s  -H "project_id: xx"  https://cardano-mainnet.blockfrost.io/api/v0/pools/2bf5a031b46b34c07937a769ff6f82b6a78a25c71022eaaf1f20eec9/history?order=desc | jq
[
  {
    "epoch": 377,
    "blocks": 73,
    "active_stake": "65000004590510",
    "active_size": 0.0025796400554051256,
    "delegators_count": 3,
    "rewards": "44005384326",
    "fees": "44005384326"
  },

As you can see both rewards and fees are returned.

3
  • I was testing with this pool. 92dc054f2d52106de52ff081afe510e9d929ae597d476bbbb15527a9. Why is this pool reward always 0?
    – Heindrick
    Dec 1, 2022 at 15:32
  • 1
    This is because this pool has never made a block, so it never got any rewards. cexplorer.io/pool/… Dec 1, 2022 at 15:35
  • 1
    I see, thank you for your answer.
    – Heindrick
    Dec 1, 2022 at 15:36

Your Answer

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

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