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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# getHighestSnapshotSlot

> Returns the highest full snapshot slot and, if available, the highest incremental snapshot slot built on it.

<Info>
  **Source**

  [`get_highest_snapshot_slot`](https://github.com/anza-xyz/agave/blob/v4.3.2/rpc/src/rpc.rs#L2927)
</Info>

<RequestExample>
  ```bash cURL
  curl https://api.devnet.solana.com -s -X POST \
    -H "Content-Type: application/json" \
    -d '
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getHighestSnapshotSlot"
    }
  '
  ```

  ```ts Kit
  import { createSolanaRpc } from "@solana/kit";

  const rpc_url = "https://api.devnet.solana.com";
  const rpc = createSolanaRpc(rpc_url);

  let hightestSnapshotSlot = await rpc.getHighestSnapshotSlot().send();

  console.log(hightestSnapshotSlot);
  ```

  ```rs Rust
  use anyhow::Result;
  use solana_client::nonblocking::rpc_client::RpcClient;
  use solana_commitment_config::CommitmentConfig;

  #[tokio::main]
  async fn main() -> Result<()> {
      let client = RpcClient::new_with_commitment(
          String::from("https://api.devnet.solana.com"),
          CommitmentConfig::confirmed(),
      );

      let highest_snapshot_slot = client.get_highest_snapshot_slot().await?;

      println!("{:#?}", highest_snapshot_slot);

      Ok(())
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Snapshot
  {
    "jsonrpc": "2.0",
    "result": {
      "full": 100,
      "incremental": 110
    },
    "id": 1
  }
  ```

  ```json title="No Snapshot"
  {
    "jsonrpc": "2.0",
    "error": {
      "code": -32008,
      "message": "No snapshot"
    },
    "id": 1
  }
  ```
</ResponseExample>

## Parameters

None

## Result

<ResponseField name="result" type="object" post={["Snapshot"]}>
  When the node has a snapshot, this returns a JSON object with the following
  fields:

  <Expandable title="properties" defaultOpen>
    <ResponseField name="full" type="u64">
      The highest full snapshot slot
    </ResponseField>

    <ResponseField name="incremental" type="u64 | null">
      The highest incremental snapshot slot _based on_ `full`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="result" type="object" post={["No Snapshot"]}>
  If the node has no snapshot, a JSON RPC error response is returned.
</ResponseField>
