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

# getSupply

> Returns total, circulating, and non-circulating supply data.

<Info>
  **Source**

  [`get_supply`](https://github.com/anza-xyz/agave/blob/v4.3.2/rpc/src/rpc.rs#L1124)
</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": "getSupply",
      "params": [
        {
          "commitment": "finalized"
        }
      ]
    }
  '
  ```

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

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

  let supply = await rpc.getSupply().send();

  console.log(supply);
  ```

  ```ts web3.js
  import { Connection, clusterApiUrl } from "@solana/web3.js";

  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  let supply = await connection.getSupply();

  console.log(supply);
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "jsonrpc": "2.0",
    "result": {
      "context": { "apiVersion": "4.3.2", "slot": 1114 },
      "value": {
        "total": 1016000,
        "circulating": 16000,
        "nonCirculating": 1000000,
        "nonCirculatingAccounts": [
          "FEy8pTbP5fEoqMV1GdTz83byuA8EKByqYat1PKDgVAq5",
          "9huDUZfxoJ7wGMTffUE7vh1xePqef7gyrLJu9NApncqA",
          "3mi1GmwEE3zo2jmfDuzvjSX9ovRXsDUKHvsntpkhuLJ9",
          "BYxEJTDerkaRWBem3XgnVcdhppktBXa2HbkHPKj2Ui4Z"
        ]
      }
    },
    "id": 1
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="config" type="object">
  Configuration object containing the following fields:

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="string" default="finalized">
      Values: `processed`, `confirmed`, `finalized`

      Solana RPC uses the following commitment levels:

      | Value       | Description                                                                                                                                                                               |
      | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `processed` | Return data from the highest slot this node has processed. This is the newest view, but the block can still be skipped.                                                                   |
      | `confirmed` | Return data from the same slot as `finalized`. Kept for compatibility and planned for removal in a later release.                                                                         |
      | `finalized` | Return data from the highest slot with a finalization certificate, from votes by 80% of stake in one round or 60% of stake in each of two rounds. This is the strongest commitment level. |
    </ParamField>

    <ParamField body="excludeNonCirculatingAccountsList" type="bool" default="false">
      Values: `true`, `false`

      Exclude non circulating accounts list from response

      ```json Example
      { "excludeNonCirculatingAccountsList": true }
      ```
    </ParamField>
  </Expandable>
</ParamField>

## Result

<ResponseField name="result" type="object">
  RpcResponse object containing:

  <Expandable title="properties" defaultOpen>
    <ResponseField name="context" type="object">
      Slot and API version the node used to answer this request.

      | Field        | Type     | Description                                                                     |
      | ------------ | -------- | ------------------------------------------------------------------------------- |
      | `slot`       | `u64`    | Slot at which the node evaluated this request.                                  |
      | `apiVersion` | `string` | RPC API version reported by the node. This field may be omitted by older nodes. |
    </ResponseField>

    <ResponseField name="value" type="object">
      Supply object with the following fields:

      | Field                    | Type    | Description                                                                                                                                        |
      | ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `circulating`            | `u64`   | Circulating supply, in lamports.                                                                                                                   |
      | `nonCirculating`         | `u64`   | Non-circulating supply, in lamports.                                                                                                               |
      | `nonCirculatingAccounts` | `array` | Account addresses of non-circulating accounts, as base-58 encoded strings. If `excludeNonCirculatingAccountsList` is enabled, this array is empty. |
      | `total`                  | `u64`   | Total supply, in lamports.                                                                                                                         |
    </ResponseField>
  </Expandable>
</ResponseField>
