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

# Método RPC getTokenAccountsWithCursor

> Recorre todas las cuentas de token de un mint de Solana, del mayor balance al menor, página a página con un cursor. Parámetros y ejemplos de getTokenAccountsWithCursor.

Recorre todas las cuentas de token de un mint, del mayor balance al menor, con **getTokenAccountsWithCursor**. Funciona con **Ridge DB**. La primera página contiene los principales holders, así que una tabla del top 50 es una sola llamada; sigue paginando para exportar todos los holders.

* Cada fila incluye la `address` de la cuenta de token, su wallet `owner`, el `amount` raw, `decimals`, `uiAmount` y `uiAmountString`.
* `limit` es 100 por página por defecto. Los valores superiores a 1.000 se limitan a 1.000.
* Pasa `nextCursor` como `cursor` para obtener la página siguiente. Detente cuando `hasMore` sea false. Una página llena pone `hasMore` a true, así que la última página puede llegar vacía.
* Las cuentas con balance cero se incluyen y aparecen al final. Omite las de `amount` "0" si solo quieres holders.
* `changedSince` devuelve solo las cuentas modificadas después de ese slot.

Cuesta 1 crédito por llamada y solo cuenta para el RPS general.

Configuración y errores: [inicio rápido RPC](https://docs.solanatracker.io/es/solana-rpc/quickstart.md). Facturación: [créditos y límites](https://docs.solanatracker.io/es/solana-rpc/credits-and-rate-limits.md).


## OpenAPI

````yaml gettokenaccountswithcursor 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: getTokenAccountsWithCursor
      description: >-
        Walk every token account of a mint, largest balance first, page by page
        with a cursor. Each row has the account address, owner wallet and
        balance.
      operationId: gettokenaccountswithcursor
      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:
                        - getTokenAccountsWithCursor
                      description: The name of the RPC method to invoke.
                      example: getTokenAccountsWithCursor
                params:
                  allOf:
                    - type: array
                      description: The mint, then an optional configuration object.
                      default:
                        - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        - limit: 100
                      items:
                        oneOf:
                          - type: string
                            description: Token mint address, as a base-58 encoded string.
                            example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                          - type: object
                            description: Optional paging configuration.
                            properties:
                              limit:
                                type: integer
                                description: >-
                                  Token accounts per page. Defaults to 100.
                                  Values above 1,000 are capped at 1,000.
                                minimum: 1
                                maximum: 1000
                                default: 100
                                example: 100
                              cursor:
                                type: string
                                description: The `nextCursor` from the previous page.
                                example: 3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa
                              changedSince:
                                type: integer
                                description: >-
                                  Only return token accounts last changed after
                                  this slot.
                                example: 372909702
                              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:
              topHolders:
                summary: Top 50 token accounts of a mint
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenAccountsWithCursor
                  params:
                    - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    - limit: 50
              nextPage:
                summary: Next page with a cursor
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenAccountsWithCursor
                  params:
                    - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    - limit: 1000
                      cursor: 3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa
      responses:
        '200':
          description: Successfully retrieved a page of token accounts for the mint.
          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: One page of the mint's token accounts.
                        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: object
                            description: The page and its navigation fields.
                            properties:
                              accounts:
                                type: array
                                description: >-
                                  Token accounts of the mint, largest balance
                                  first. Zero-balance accounts come last.
                                items:
                                  type: object
                                  properties:
                                    address:
                                      type: string
                                      description: Token account address.
                                      example: >-
                                        3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa
                                    owner:
                                      type: string
                                      description: Wallet that owns the token account.
                                      example: >-
                                        9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
                                    amount:
                                      type: string
                                      description: Raw balance without decimals.
                                      example: '1250000000000000'
                                    decimals:
                                      type: integer
                                      description: Number of decimals of the mint.
                                      example: 6
                                    uiAmount:
                                      type:
                                        - number
                                        - 'null'
                                      description: Balance with decimals applied.
                                      example: 1250000000
                                    uiAmountString:
                                      type: string
                                      description: >-
                                        Balance with decimals applied, as a
                                        string.
                                      example: '1250000000'
                              nextCursor:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Address of the last account on this page. Pass
                                  it as `cursor` for the next page. Null when
                                  the page is empty.
                                example: 3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa
                              hasMore:
                                type: boolean
                                description: >-
                                  True when the page is full. The next page can
                                  still be empty.
                                example: true
              examples:
                topHolders:
                  summary: Page of token accounts
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        apiVersion: 3.0.0
                        slot: 372910193
                      value:
                        accounts:
                          - address: 3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa
                            amount: '1250000000000000'
                            decimals: 6
                            owner: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
                            uiAmount: 1250000000
                            uiAmountString: '1250000000'
                          - address: BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA
                            amount: '642813004178230'
                            decimals: 6
                            owner: 5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1
                            uiAmount: 642813004.17823
                            uiAmountString: '642813004.17823'
                        hasMore: true
                        nextCursor: BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA
        '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.