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

# Historical getMultipleAccounts RPC Method

> Read up to 100 Solana accounts as they were at any past slot, in one request. Historical getMultipleAccounts parameters, limitations and examples.

Read up to 100 accounts as they were in the past with the standard **getMultipleAccounts** method. Add one of these to the config object:

* `slot`: every account as of the end of that slot.
* `lastUpdateBeforeSlot`: each account as of its own last update strictly before that slot.
* `firstUpdateAfterSlot`: each account as of its own first update strictly after that slot.

Set exactly one. Without any of them, `getMultipleAccounts` returns the accounts as they are now: see [getMultipleAccounts](https://docs.solanatracker.io/solana-rpc/http/getmultipleaccounts.md).

Results are in input order. With `lastUpdateBeforeSlot` and `firstUpdateAfterSlot` the accounts can come from different slots, so the result adds `slots`: one slot per account, in input order, `null` where an account has no update on that side.

## Limitations

* Historical reads return finalized data. `commitment` is ignored, and `minContextSlot` cannot be combined with these options.
* `value` holds `null` for an account that did not exist or was closed at that point, or when no data is known for it.
* **SPL Token and Token-2022 mint accounts** cannot be read historically: they return error `-32033` with `data.reason: "splTokenMint"`, and **one such address fails the whole request**. Stake, vote, config and sysvar accounts also return `-32033`.
* **Token accounts** are rebuilt from their balance history. Balance, mint, owner and rent lamports are returned; Token-2022 extensions, delegate, frozen state, close authority and exact `space` are not.
* A slot after the latest available slot returns `-32030`, one before the earliest returns `-32031`, and a slot with no data available returns `-32034`. A `lastUpdateBeforeSlot` or `firstUpdateAfterSlot` walk past the first or last known update returns `-32020`.
* `dataSlice` is not allowed with `jsonParsed` or `jsonParsedEnhanced`.

A historical read costs 1 credit, the same as the live call. To walk one account's history with earlier versions, use [historical getAccountInfo](https://docs.solanatracker.io/solana-rpc/http/historical-getaccountinfo.md).

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