> ## 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.

# getSlot on Solana

> Call getSlot on Solana via GoldRush JSON-RPC. Returns the slot that has reached the given commitment level. Endpoint, parameters, return values, and code examples.

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

`getSlot` on **Solana**: Returns the slot that has reached the given commitment level.

## 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                      |
| -------- | -------- | -------- | --------------------------------- | ---------------------------- |
| `config` | `object` | no       | `{commitment?, minContextSlot?}`. | `{"commitment":"finalized"}` |

## Returns

`u64`: Current slot.

```json theme={null}
372877175
```

## 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": "getSlot",
      "params": [{"commitment":"finalized"}]
    }'
  ```

  ```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.getSlot({"commitment":"finalized"}).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": "getSlot", "params": [{"commitment":"finalized"}]},
  )
  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

* [`getSlotLeader` on Solana](/api-reference/json-rpc/solana/getslotleader)
* [`getSlotLeaders` on Solana](/api-reference/json-rpc/solana/getslotleaders)
* [`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)
