queryLedgerState_liveStakeDistribution - Cardano
This method returns the live stake distribution across stake pools, giving each pool's share of the total active stake.
Parameters
This method does not require parameters.
Request
bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "queryLedgerState/liveStakeDistribution",
"id": "getblock.io"
}'example.js
javascriptconst response = await fetch(
'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"jsonrpc": "2.0", "method": "queryLedgerState/liveStakeDistribution", "id": "getblock.io"})
}
);
console.log(await response.json());example.py
pythonimport requests
response = requests.post(
'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={"jsonrpc": "2.0", "method": "queryLedgerState/liveStakeDistribution", "id": "getblock.io"}
)
print(response.json())Response
json{
"jsonrpc": "2.0",
"method": "queryLedgerState/liveStakeDistribution",
"result": {
"pool1abc...": {
"stake": "12/1000000",
"vrf": "b3c2...vrf-hash"
}
},
"id": "getblock.io"
}Response Parameters
| Field | Type | Description |
|---|---|---|
| stake | string | Pool's share of the total live stake, as a ratio |
| vrf | string | The pool's VRF verification key hash |
Use Cases
- Reward Modeling: Estimate pool rewards from stake share
- Decentralization Metrics: Measure stake concentration across pools
- Delegation Advice: Weigh saturation when choosing a pool
- Analytics: Track stake movement between epochs
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | A required field is missing or has the wrong type |
| -32000 | Query unavailable | The query is not available in the current ledger era |
| -32603 | Internal error | The node failed to answer the query |