1

I am going to get delegations list for specific pool, epoch. https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1{number}~1stakes~1{pool_id}/get

I found blockfrost api and tested. My test pool: ac66c8efb8edba3991576235e421ef0524ab351a22598de520de7b16, Epoch: 378 I got 9 delegations from blockfrost api.

[
    {
        "stake_address": "stake1uyyp9ydgm834vnhhv0wd9sd9xlxwsmcv37xs6uw0f66626scn5v6z",
        "amount": "3326619748"
    },
    {
        "stake_address": "stake1uy8vrh3a8ujzqanlw2r3rf23lc6uelnd390lanxwulsdhqqudsl8m",
        "amount": "116381727"
    },
    {
        "stake_address": "stake1uyjv3s932h8ar2zudw6q30h65kn76g00v0z7kmz2td5cgdsx5dl7r",
        "amount": "1024314243"
    },
    {
        "stake_address": "stake1uy4kl6dyg3hegqapvx53y6lazgx3z79g4p2ds4rc80lcvuc4j9v4h",
        "amount": "7062695853"
    },
    {
        "stake_address": "stake1u927nhw76vzpmtufuc5fa4nj74tkw9mhugqrqdz9hklw9hctcfv4y",
        "amount": "15260602"
    },
    {
        "stake_address": "stake1ux3rkq6grckauj72qyfm9mcs8y49phzrm9el00rzdh6n3kcnnspzy",
        "amount": "771665304"
    },
    {
        "stake_address": "stake1u820d54llavvwctmuvr6gugytlqlglp4slyy30vl4w43wag6dn4ya",
        "amount": "0"
    },
    {
        "stake_address": "stake1u84euhe0va89n55t02y4xdydtpd0gau48e73wahhmuplj4chr87cv",
        "amount": "169480944"
    },
    {
        "stake_address": "stake1u8aa3nq3vf98jw36977lu6s09pa2xtfr3v65sagl7nywhys5jxvfa",
        "amount": "226565423"
    }
]

If I check by cardanoscan.io explorer, I can see 12 delegators. https://cardanoscan.io/pool/ac66c8efb8edba3991576235e421ef0524ab351a22598de520de7b16?tab=delegators

I think I should get 12 delegations from api, but I got 9 delegations. Could anyone help me to get exact delegations?

1 Answer 1

2

You are looking at a number of delegators for the active epoch (therefore the state of delegators two epochs ago) and cardanoscan is showing you the live delegations, which are two different things.

To get the current list of delegators, you need to use the /pools/delegators endpoint:

$ curl -s  -H "project_id: ..." "https://cardano-mainnet.blockfrost.io/api/v0/pools/ac66c8efb8edba3991576235e421ef0524ab351a22598de520de7b16/delegators" \
   | jq .[].address \
   | wc -l
12
2
  • Thank you for your answer. 378 is current epoch. Could you explain why it is two epochs ago?
    – Heindrick
    Commented Nov 29, 2022 at 15:46
  • When you're talking about delegation against an epoch, you're expected to be looking at active stake of delegators for said epoch (as that's what you're getting blocks assigned for, and rewarded accordingly), not live stake/delegators
    – RdLrT
    Commented Nov 29, 2022 at 21:48

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.