> ## 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 getMultipleAccounts histórico

> Lee hasta 100 cuentas de Solana tal como estaban en cualquier slot pasado, en una sola petición. Parámetros, limitaciones y ejemplos de getMultipleAccounts histórico.

Lee hasta 100 cuentas tal como estaban en el pasado con el método estándar **getMultipleAccounts**. Añade una de estas opciones al objeto de configuración:

* `slot`: cada cuenta al final de ese slot.
* `lastUpdateBeforeSlot`: cada cuenta tras su propia última actualización estrictamente anterior a ese slot.
* `firstUpdateAfterSlot`: cada cuenta tras su propia primera actualización estrictamente posterior a ese slot.

Indica solo una. Sin ninguna, `getMultipleAccounts` devuelve las cuentas tal como están ahora: consulta [getMultipleAccounts](https://docs.solanatracker.io/es/solana-rpc/http/getmultipleaccounts.md).

Los resultados siguen el orden de entrada. Con `lastUpdateBeforeSlot` y `firstUpdateAfterSlot` las cuentas pueden venir de slots distintos, así que el resultado añade `slots`: un slot por cuenta, en el orden de entrada, `null` cuando una cuenta no tiene actualización en ese sentido.

## Limitaciones

* Las lecturas históricas devuelven datos finalized. `commitment` se ignora y `minContextSlot` no se puede combinar con estas opciones.
* `value` contiene `null` para una cuenta que no existía o estaba cerrada en ese momento, o cuando no hay datos de ella.
* **Las cuentas mint de SPL Token y Token-2022** no se pueden leer de forma histórica: devuelven el error `-32033` con `data.reason: "splTokenMint"`, y **una sola de esas direcciones hace fallar toda la petición**. Las cuentas stake, vote, config y sysvar también devuelven `-32033`.
* **Las cuentas de tokens** se reconstruyen a partir de su historial de saldo. Se devuelven el saldo, el mint, el propietario y los lamports de renta; no se devuelven las extensiones de Token-2022, el delegado, el estado congelado, la autoridad de cierre ni el `space` exacto.
* Un slot posterior al último disponible devuelve `-32030`, uno anterior al primero devuelve `-32031` y un slot sin datos disponibles devuelve `-32034`. Un recorrido con `lastUpdateBeforeSlot` o `firstUpdateAfterSlot` que pasa de la primera o la última actualización conocida devuelve `-32020`.
* `dataSlice` no se admite con `jsonParsed` ni `jsonParsedEnhanced`.

Una lectura histórica cuesta 1 crédito, igual que la llamada en tiempo real. Para recorrer el historial de una cuenta con versiones anteriores, usa [getAccountInfo histórico](https://docs.solanatracker.io/es/solana-rpc/http/historical-getaccountinfo.md).

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 historical-getmultipleaccounts 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: Historical getMultipleAccounts
      description: >-
        Read up to 100 accounts as they were at a past slot, in input order.
        Send `getMultipleAccounts` with `slot`, `lastUpdateBeforeSlot` or
        `firstUpdateAfterSlot` in the config object.
      operationId: historical-getmultipleaccounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      description: The JSON-RPC protocol version.
                      enum:
                        - '2.0'
                      example: '2.0'
                      default: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                      default: '1'
                method:
                  allOf:
                    - type: string
                      description: The name of the RPC method to invoke.
                      enum:
                        - getMultipleAccounts
                      example: getMultipleAccounts
                      default: getMultipleAccounts
                params:
                  allOf:
                    - type: array
                      description: Parameters for the method.
                      default:
                        - - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                          - H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS
                        - encoding: base64
                          slot: 411108200
                      items:
                        oneOf:
                          - type: array
                            description: >-
                              Array of Solana account addresses (up to 100) to
                              fetch in a single optimized batch request.
                            items:
                              type: string
                            example:
                              - vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg
                              - 4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA
                          - type: object
                            description: >-
                              Required. Set exactly one of `slot`,
                              `lastUpdateBeforeSlot` or `firstUpdateAfterSlot`.
                              Historical reads always return finalized data.
                            properties:
                              dataSlice:
                                type: object
                                description: >-
                                  Request a slice of the account's data. Not
                                  allowed with `jsonParsed` or
                                  `jsonParsedEnhanced`.
                                properties:
                                  length:
                                    type: integer
                                    description: Number of bytes to return.
                                    example: 50
                                  offset:
                                    type: integer
                                    description: Byte offset from which to start reading.
                                    example: 0
                              encoding:
                                type: string
                                description: >-
                                  Encoding format for the returned account data.
                                  `jsonParsedEnhanced` is `jsonParsed` plus
                                  Anchor IDL decoding of account data the
                                  standard parser leaves unparsed. It costs no
                                  extra credits.
                                enum:
                                  - jsonParsed
                                  - jsonParsedEnhanced
                                  - base58
                                  - base64
                                  - base64+zstd
                                example: base58
                              changedSinceSlot:
                                type: integer
                                description: >-
                                  Only return accounts that have been modified
                                  at or after this slot number. For accounts
                                  that exist but haven't changed since the
                                  specified slot, the response will contain
                                  status as "unchanged".
                                example: 464175999
                              slot:
                                type: integer
                                description: >-
                                  return each account as it was at the end of
                                  this slot (the last update at or before it).
                                  Set at most one of `slot`,
                                  `lastUpdateBeforeSlot` and
                                  `firstUpdateAfterSlot`.
                                example: 411108200
                              lastUpdateBeforeSlot:
                                type: integer
                                description: >-
                                  return each account as of its most recent
                                  update strictly before this slot. Set at most
                                  one of `slot`, `lastUpdateBeforeSlot` and
                                  `firstUpdateAfterSlot`. Each account moves to
                                  its own nearest update; `result.slots` says
                                  which slot each one is from.
                                example: 411108200
                              firstUpdateAfterSlot:
                                type: integer
                                description: >-
                                  return each account as of its first update
                                  strictly after this slot. Set at most one of
                                  `slot`, `lastUpdateBeforeSlot` and
                                  `firstUpdateAfterSlot`. Each account moves to
                                  its own nearest update; `result.slots` says
                                  which slot each one is from.
                                example: 411000000
                      minItems: 2
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              historicalAtSlot:
                summary: Historical read at a slot
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getMultipleAccounts
                  params:
                    - - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                      - H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS
                    - encoding: base64
                      slot: 411108200
              historicalLastUpdateBefore:
                summary: Each account's most recent update before a slot
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getMultipleAccounts
                  params:
                    - - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                      - H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS
                    - encoding: base64
                      lastUpdateBeforeSlot: 411108200
      responses:
        '200':
          description: Successfully retrieved the account details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: object
                        description: Accounts information with context.
                        properties:
                          context:
                            type: object
                            description: Context of the response.
                            properties:
                              apiVersion:
                                type: string
                                description: API version of the response.
                                example: 2.0.15
                              slot:
                                type: integer
                                description: >-
                                  The slot at which the data was fetched. For
                                  `lastUpdateBeforeSlot` and
                                  `firstUpdateAfterSlot`, the slot you passed.
                                example: 341197247
                          value:
                            type: array
                            description: Array of account details.
                            items:
                              oneOf:
                                - type: 'null'
                                  description: >-
                                    Null if the account doesn't exist. On a
                                    historical read: the account did not exist
                                    or was closed at that point, or no data is
                                    known for it.
                                - type: object
                                  description: Account details.
                                  properties:
                                    lamports:
                                      type: integer
                                      description: >-
                                        Number of lamports assigned to the
                                        account.
                                      example: 88849814690250
                                    owner:
                                      type: string
                                      description: >-
                                        Base-58 encoded Pubkey of the program
                                        the account is assigned to.
                                      example: '11111111111111111111111111111111'
                                    data:
                                      type: array
                                      description: >-
                                        Account data as encoded binary or JSON
                                        format.
                                      items:
                                        type: string
                                      example:
                                        - ''
                                        - base58
                                    executable:
                                      type: boolean
                                      description: >-
                                        Indicates if the account contains a
                                        program.
                                      example: false
                                    rentEpoch:
                                      type: integer
                                      description: >-
                                        Epoch at which this account will next
                                        owe rent.
                                      example: 18446744073709552000
                                    space:
                                      type: integer
                                      description: Data size of the account.
                                      example: 0
                                - type: object
                                  description: >-
                                    Status-only response when account exists but
                                    hasn't changed since the specified slot.
                                  properties:
                                    status:
                                      type: string
                                      description: >-
                                        Status indicating the account hasn't
                                        changed since the specified slot.
                                      enum:
                                        - unchanged
                                      example: unchanged
                          slots:
                            type: array
                            description: >-
                              Only with `lastUpdateBeforeSlot` or
                              `firstUpdateAfterSlot`: the slot of the update
                              returned for each account, in the same order as
                              `value`. `null` where an account has no update on
                              that side of the slot.
                            items:
                              type:
                                - integer
                                - 'null'
                            example:
                              - 411107934
                              - null
              examples:
                historicalLastUpdateBefore:
                  summary: Each account's most recent update before a slot
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        apiVersion: 4.2.1
                        slot: 411108200
                      value:
                        - data:
                            - ''
                            - base64
                          executable: false
                          lamports: 1523847120
                          owner: '11111111111111111111111111111111'
                          rentEpoch: 18446744073709552000
                          space: 0
                        - null
                      slots:
                        - 411107934
                        - null
                splTokenMint:
                  summary: SPL Token mint (not available historically)
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32033
                      message: >-
                        Historic SPL Token mint state is not archived:
                        EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      data:
                        pubkeys:
                          - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        reason: splTokenMint
                    id: 1
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: >-
                          Please check the request parameters and ensure they
                          are valid.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: Please verify your API key and try again.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: >-
                          You have exceeded the allowed number of requests.
                          Please wait and try again later.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: >-
                          An unexpected error occurred on the server. Please try
                          again later or contact support.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: >-
                          The service is currently unavailable. Please try again
                          later or contact support.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        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
                      data:
                        additionalInfo: >-
                          The request timed out. Please try again later or
                          contact support.
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
      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.