Solana
Solana
Solana
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
getSlotLeaders is a Solana JSON-RPC method that returns the leader for each slot across a contiguous range on the chain that secures SOL. You pass a startSlot and a limit, and the response is an array of base-58 pubkeys — one entry per slot, in order. It is the range counterpart to getSlotLeader, handy for looking ahead at who will produce upcoming blocks. Send it as a JSON-RPC 2.0 POST with positional params to https://solana.therpc.io/YOUR_API_KEY.
| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | startSlot | integer | Sí | First slot of the range. |
| 2 | limit | integer | Sí | Number of leaders to return (≤5000). |
| Tipo | Descripción |
|---|---|
| array | Array of base-58 leader pubkeys, one per slot in the range. |
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
limit is capped at 5000, so split longer ranges into successive chunks and stitch the arrays together.