Pool Delegators History

Hi,

I am looking for a lean way to keep track of the history of delegators + delegated ADA in a pool over time.
I frist tried via Blockfrost but the API seems to provide only a snapshot of the current delegations.

Best
Jochen

I think you should get those informations from the tax report from pooltool.io

Hello @jochen,
i’ve made the Delegations table available in our API.
https://mainnet.cutymals.com/swagger/index.html
Unter the tab Delegations you have the options:

  • poolHash = shows all delegations related to your pool (you can enter bech32 or hex addres, doesnt matter)
  • stakeAddress = shows all delegations made by that stake key (history for that key)
  • top = limit results returned
  • skip = use to page through results
  • filter = filter for specific data in your result set (e.g. “filter=ActiveEpochNo gt 300”, shows only delegations related to your pool, which started in EPOCH 300)
  • select = only return a part of the request (e.g. “select=ActiveEpochNo” only returns the active epoch for all entries). Can be used to get exactly what you need.
  • orderby = allows you to sort the results (e…g “orderby=id desc” is exactly what we used to show the latest delegations on top and oldest on bottom)
  • count = counts all results which match your filters so (e.g. “count=true” counts all active delegations to your pool)
  • expand = joins related tables into the query (e.g. “expand=*” joins all whats possible)

https://mainnet.cutymals.com/odata/Delegations?poolHash=pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s%20&X-API-KEY=ILoveCutyMals&%24orderby=id%20desc&%24expand=*

{
  "@odata.context": "https://mainnet.cutymals.com/odata/$metadata#Delegations(Addr(),PoolHash(),Redeemer(),Tx())",
  "value": [
    {
      "Id": 1905096,
      "AddrId": 4034719,
      "CertIndex": 1,
      "PoolHashId": 13525,
      "ActiveEpochNo": 310,
      "TxId": 25085619,
      "SlotNo": 47754068,
      "RedeemerId": null,
      "Addr": {
        "Id": 4034719,
        "HashRaw": "e199aaeee4dd64613ea7987540a8fe88d7ce31668540b2836c65810859",
        "View": "stake1uxv64mhym4jxz048np65p2873rtuuvtxs4qt9qmvvkqsskg8u9y6t",
        "RegisteredTxId": 24060739,
        "ScriptHash": null
      },
      "PoolHash": {
        "Id": 13525,
        "HashRaw": "19c56be8538786b0b1ddaeb4049faf6a00df0ca2df15e05b0472a866",
        "View": "pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s"
      },
      "Redeemer": null,
      "Tx": {
        "Id": 25085619,
        "Hash": "613797e565c7b239265eac7b4435b31acfde72a76241200cbfab591ea50b7cb0",
        "BlockId": 6714416,
        "BlockIndex": 8,
        "OutSum": 17825743,
        "Fee": 174257,
        "Deposit": 2000000,
        "Size": 425,
        "InvalidBefore": null,
        "InvalidHereafter": 47761194,
        "ValidContract": true,
        "ScriptSize": 0
      }
    },
    {
      "Id": 1903677,
      "AddrId": 3955974,
      "CertIndex": 1,
      "PoolHashId": 13525,
      "ActiveEpochNo": 310,
      "TxId": 25058877,
      "SlotNo": 47728474,
      "RedeemerId": null,
      "Addr": {
        "Id": 3955974,
        "HashRaw": "e11a545bbd28c64744d6d1f8e6b235e289b9e06e379ac24368def6029b",
        "View": "stake1uyd9gkaa9rryw3xk68uwdv34u2ymncrwx7dvysmgmmmq9xcz26typ",
        "RegisteredTxId": 23237520,
        "ScriptHash": null
      },
      "PoolHash": {
        "Id": 13525,
        "HashRaw": "19c56be8538786b0b1ddaeb4049faf6a00df0ca2df15e05b0472a866",
        "View": "pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s"
      },
      "Redeemer": null,
      "Tx": {
        "Id": 25058877,
        "Hash": "f87c07c9dd70c3cf85163a280b7d9e2177ea6fbc3fada33f5da72a04e800decf",
        "BlockId": 6713079,
        "BlockIndex": 17,
        "OutSum": 1362024643,
        "Fee": 175357,
        "Deposit": 2000000,
        "Size": 429,
        "InvalidBefore": null,
        "InvalidHereafter": 47735633,
        "ValidContract": true,
        "ScriptSize": 0
      }
    },
    {
      "Id": 1858545,
      "AddrId": 4047424,
      "CertIndex": 0,
      "PoolHashId": 13525,
      "ActiveEpochNo": 309,
      "TxId": 24179309,
      "SlotNo": 47578280,
      "RedeemerId": null,
      "Addr": {
        "Id": 4047424,
        "HashRaw": "e1c87c204ea36efa518a03040c7b627038ee424bd719c37983e1c3c9f4",
        "View": "stake1u8y8cgzw5dh055v2qvzqc7mzwquwusjt6uvux7vru8punaqjszdar",
        "RegisteredTxId": 24170127,
        "ScriptHash": null
      },
      "PoolHash": {
        "Id": 13525,
        "HashRaw": "19c56be8538786b0b1ddaeb4049faf6a00df0ca2df15e05b0472a866",
        "View": "pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s"
      },
      "Redeemer": null,
      "Tx": {
        "Id": 24179309,
        "Hash": "cae5b0cd2ef764a870ddab7b1004472b5cf3926e5b5357c59ecb1282b76c5029",
        "BlockId": 6670901,
        "BlockIndex": 12,
        "OutSum": 9440625,
        "Fee": 172761,
        "Deposit": 0,
        "Size": 391,
        "InvalidBefore": null,
        "InvalidHereafter": 47585326,
        "ValidContract": true,
        "ScriptSize": 0
      }
    },
    {
      "Id": 1858510,
      "AddrId": 4047424,
      "CertIndex": 0,
      "PoolHashId": 13525,
      "ActiveEpochNo": 309,
      "TxId": 24178274,
      "SlotNo": 47577748,
      "RedeemerId": null,
      "Addr": {
        "Id": 4047424,
        "HashRaw": "e1c87c204ea36efa518a03040c7b627038ee424bd719c37983e1c3c9f4",
        "View": "stake1u8y8cgzw5dh055v2qvzqc7mzwquwusjt6uvux7vru8punaqjszdar",
        "RegisteredTxId": 24170127,
        "ScriptHash": null
      },
      "PoolHash": {
        "Id": 13525,
        "HashRaw": "19c56be8538786b0b1ddaeb4049faf6a00df0ca2df15e05b0472a866",
        "View": "pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s"
      },
      "Redeemer": null,
      "Tx": {
        "Id": 24178274,
        "Hash": "37d459f8d2721b730e5393e1739369bc6e8555db7bdf1158167a8eca1fc9d1c5",
        "BlockId": 6670872,
        "BlockIndex": 36,
        "OutSum": 9613386,
        "Fee": 172761,
        "Deposit": 0,
        "Size": 391,
        "InvalidBefore": null,
        "InvalidHereafter": 47584829,
        "ValidContract": true,
        "ScriptSize": 0
      }
    },
    {
      "Id": 1858479,
      "AddrId": 4047424,
      "CertIndex": 1,
      "PoolHashId": 13525,
      "ActiveEpochNo": 309,
      "TxId": 24177487,
      "SlotNo": 47577379,
      "RedeemerId": null,
      "Addr": {
        "Id": 4047424,
        "HashRaw": "e1c87c204ea36efa518a03040c7b627038ee424bd719c37983e1c3c9f4",
        "View": "stake1u8y8cgzw5dh055v2qvzqc7mzwquwusjt6uvux7vru8punaqjszdar",
        "RegisteredTxId": 24170127,
        "ScriptHash": null
      },
      "PoolHash": {
        "Id": 13525,
        "HashRaw": "19c56be8538786b0b1ddaeb4049faf6a00df0ca2df15e05b0472a866",
        "View": "pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s"
      },
      "Redeemer": null,
      "Tx": {
        "Id": 24177487,
        "Hash": "58aa039202a836eab7a7f6168d11f54ef64ce4c40416f8dcedbbd85cfeeaa6f6",
        "BlockId": 6670852,
        "BlockIndex": 19,
        "OutSum": 9786147,
        "Fee": 174257,
        "Deposit": 2000000,
        "Size": 425,
        "InvalidBefore": null,
        "InvalidHereafter": 47584341,
        "ValidContract": true,
        "ScriptSize": 0
      }
    }
  ],
  "@odata.nextLink": "https://mainnet.cutymals.com/odata/Delegations?poolhash=pool1r8zkh6zns7rtpvwa466qf8a0dgqd7r9zmu27qkcyw25xv46y97s%20&x-api-key=ILoveCutyMals&$orderby=id%20desc&$expand=%2A&$skiptoken=Id-1858479"
}

If you use the API through a script the @odata.nextLink can be used to download the next page just by browsing that link.

Note: The data you see is live data from the Cardano blockchain.
Note2: With the free ApiKey=ILoveCutyMals you can do 150 requests per 5 minutes (30rqs per second).Request limit is IP Based for the public key. You are also allowed to use that in public facing frontends.

If you need more, or have questions, just let me know!

If you want to dig deeper, check out this gathered use cases:

1 Like

You can get the stake distribution per pool on Blockfrost.io as well.

https://cardano-mainnet.blockfrost.io/api/v0/epochs/{number}/stakes/{pool_id}
1 Like