> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getSlotLeaders on Solana

> Call getSlotLeaders on Solana via GoldRush JSON-RPC. Returns the slot leaders for a slot range. Endpoint, parameters, return values, and code examples.

<Card title="0.01 credits per call" icon="coins" />

`getSlotLeaders` on **Solana**: Returns the slot leaders for a slot range.

## Endpoint

```
https://rpc.goldrushdata.com/v1/solana-mainnet
```

Authenticate with `Authorization: Bearer <GOLDRUSH_API_KEY>`. See [authentication](/goldrush-json-rpc/authentication).

## Parameters

| Name        | Type  | Required | Description                           | Example     |
| ----------- | ----- | -------- | ------------------------------------- | ----------- |
| `startSlot` | `u64` | yes      | First slot of the range.              | `372877175` |
| `limit`     | `u64` | yes      | Number of leaders to return (1–5000). | `10`        |

## Returns

`array<string>`: Array of base-58 leader identity pubkeys, one per slot.

```json theme={null}
["ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS","2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"]
```

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl https://rpc.goldrushdata.com/v1/solana-mainnet \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getSlotLeaders",
      "params": [372877175, 10]
    }'
  ```

  ```typescript @solana/kit theme={null}
  import {
    createDefaultRpcTransport,
    createSolanaRpcFromTransport,
  } from "@solana/kit";

  const transport = createDefaultRpcTransport({
    url: "https://rpc.goldrushdata.com/v1/solana-mainnet",
    headers: { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}` },
  });
  const rpc = createSolanaRpcFromTransport(transport);

  const result = await rpc.getSlotLeaders(372877175, 10).send();
  console.log(result);
  ```

  ```python python theme={null}
  import os
  import requests

  resp = requests.post(
      "https://rpc.goldrushdata.com/v1/solana-mainnet",
      headers={
          "Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={"jsonrpc": "2.0", "id": 1, "method": "getSlotLeaders", "params": [372877175, 10]},
  )
  print(resp.json()["result"])
  ```
</CodeGroup>

## Errors

Standard JSON-RPC errors: `-32600` invalid request, `-32601` method not found, `-32602` invalid params.

## Related Slot info methods on Solana

* [`getSlot` on Solana](/api-reference/json-rpc/solana/getslot)
* [`getSlotLeader` on Solana](/api-reference/json-rpc/solana/getslotleader)
* [`getLeaderSchedule` on Solana](/api-reference/json-rpc/solana/getleaderschedule)
* [`getMaxRetransmitSlot` on Solana](/api-reference/json-rpc/solana/getmaxretransmitslot)
* [`getMaxShredInsertSlot` on Solana](/api-reference/json-rpc/solana/getmaxshredinsertslot)
