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

# getTokenHolderCounts RPC Method

> Get holder counts for up to 5,000 Solana tokens in one call, all read at the same slot. getTokenHolderCounts RPC parameters and examples.

Get holder counts for many tokens in one call with **getTokenHolderCounts**. Powered by **Ridge DB**. Even USDC, USDT and wSOL together answer in well under a millisecond.

* Pass 1 to 5,000 mint addresses. Results come back in request order.
* A holder is a token account with a balance above zero, SPL Token and Token-2022 together. Counts are token accounts, not unique owners.
* Every count in a reply is read at the same slot (`context.slot`), so tokens compare fairly.
* Use `commitment` and `minContextSlot` to choose the view and refuse stale data.

Costs 1 credit per call and counts only against General RPS.

Request setup and error handling: [RPC quickstart](https://docs.solanatracker.io/solana-rpc/quickstart.md). Billing: [credits and limits](https://docs.solanatracker.io/solana-rpc/credits-and-rate-limits.md).


## OpenAPI

````yaml gettokenholdercounts post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getTokenHolderCounts
      description: >-
        Holder counts for up to 5,000 mints in one call, all read at the same
        slot. A holder is a token account with a balance above zero, SPL Token
        and Token-2022 together.
      operationId: gettokenholdercounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      enum:
                        - '2.0'
                      description: The JSON-RPC protocol version.
                      example: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                method:
                  allOf:
                    - type: string
                      enum:
                        - getTokenHolderCounts
                      description: The name of the RPC method to invoke.
                      example: getTokenHolderCounts
                params:
                  allOf:
                    - type: array
                      description: >-
                        The list of mints, then an optional configuration
                        object.
                      default:
                        - - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                          - Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
                          - So11111111111111111111111111111111111111112
                      items:
                        oneOf:
                          - type: array
                            description: >-
                              Token mint addresses, as base-58 encoded strings.
                              1 to 5,000 mints per request.
                            minItems: 1
                            maxItems: 5000
                            items:
                              type: string
                            example:
                              - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                              - Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
                              - So11111111111111111111111111111111111111112
                          - type: object
                            description: Optional configuration object.
                            properties:
                              commitment:
                                type: string
                                description: The commitment level for the request.
                                enum:
                                  - confirmed
                                  - finalized
                                  - processed
                                example: confirmed
                              minContextSlot:
                                type: integer
                                description: >-
                                  The minimum slot that the request can be
                                  evaluated at. Fails with error -32016 if the
                                  data is older.
                                example: 372900000
            examples:
              threeMints:
                summary: Holder counts for USDC, USDT and wSOL
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenHolderCounts
                  params:
                    - - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      - Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
                      - So11111111111111111111111111111111111111112
              withCommitment:
                summary: Finalized count at or after a slot
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenHolderCounts
                  params:
                    - - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    - commitment: finalized
                      minContextSlot: 372900000
      responses:
        '200':
          description: Successfully retrieved holder counts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: object
                        description: Holder counts, all read at the same slot.
                        properties:
                          context:
                            type: object
                            description: Context of the response.
                            properties:
                              apiVersion:
                                type: string
                                description: API version.
                                example: 3.0.0
                              slot:
                                type: integer
                                description: Slot the data was read at.
                                example: 372910193
                          value:
                            type: array
                            description: One entry per requested mint, in request order.
                            items:
                              type: object
                              properties:
                                mint:
                                  type: string
                                  description: The mint, as passed in the request.
                                  example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                                holderCount:
                                  type: integer
                                  description: >-
                                    Number of SPL Token and Token-2022 accounts
                                    of this mint with a balance above zero.
                                    Counts token accounts, not unique owners.
                                  example: 5734410
              examples:
                threeMints:
                  summary: Holder counts for three mints
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        apiVersion: 3.0.0
                        slot: 372910193
                      value:
                        - holderCount: 5734410
                          mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        - holderCount: 2410388
                          mint: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
                        - holderCount: 13102557
                          mint: So11111111111111111111111111111111111111112
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32602
                      message: Invalid params
                    id: 1
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32001
                      message: Unauthorized
                    id: 1
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32005
                      message: Too many requests
                    id: 1
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32603
                      message: Internal error
                    id: 1
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32002
                      message: Service unavailable
                    id: 1
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32003
                      message: Gateway timeout
                    id: 1
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.