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

# getHistoricalSolBalances RPC Method

> Read the SOL balance of up to 100 accounts at any past slot or timestamp. getHistoricalSolBalances RPC parameters and examples.

Get the SOL balance of up to 100 accounts at one point in the past, in a single call. Each balance comes with the change that set it: its slot, time, the balance before and the signed delta.

* Pass exactly one of `slot` or `timestamp`. `timestamp` is Unix seconds.
* The balance is the last one at or before that point. `lastBalanceChange.slot` and `timestamp` belong to that change, not to the point you asked for.
* `balances` keeps the order of `accounts`. An account that did not exist yet, or was closed with zero lamports, is `null`; `found` counts the rest.
* 1 to 100 accounts per request.

Cost: 2 credits per call, counted 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 gethistoricalsolbalances 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: getHistoricalSolBalances
      description: >-
        Read the SOL balance of up to 100 accounts at a past slot or timestamp,
        with the change that set each balance.
      operationId: gethistoricalsolbalances
      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:
                        - getHistoricalSolBalances
                      description: The name of the RPC method to invoke.
                      example: getHistoricalSolBalances
                      default: getHistoricalSolBalances
                params:
                  allOf:
                    - type: array
                      description: >-
                        A single configuration object with the accounts and one
                        point in time.
                      default:
                        - accounts:
                            - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                          slot: 411108200
                      items:
                        type: object
                        description: Accounts and the point in time to read them at.
                        required:
                          - accounts
                        properties:
                          accounts:
                            type: array
                            description: Account addresses to read, 1 to 100.
                            minItems: 1
                            maxItems: 100
                            items:
                              type: string
                            example:
                              - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                              - H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS
                          slot:
                            type: integer
                            description: >-
                              Read balances as of this slot. Set exactly one of
                              `slot` or `timestamp`.
                            example: 411108200
                          timestamp:
                            type: integer
                            description: >-
                              Read balances as of this time, in Unix seconds
                              (milliseconds are also accepted). Set exactly one
                              of `slot` or `timestamp`.
                            example: 1775359465
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              bySlot:
                summary: Balances at a slot
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getHistoricalSolBalances
                  params:
                    - accounts:
                        - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                        - H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS
                      slot: 411108200
              byTimestamp:
                summary: Balances at a Unix timestamp
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getHistoricalSolBalances
                  params:
                    - accounts:
                        - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                      timestamp: 1767225600
      responses:
        '200':
          description: Historical SOL balances in request order.
          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: Balances in request order.
                        properties:
                          balances:
                            type: array
                            description: >-
                              One entry per requested account, in the same
                              order. `null` where no balance exists at that
                              point.
                            items:
                              oneOf:
                                - type: 'null'
                                  description: >-
                                    The account did not exist at that point, or
                                    had been closed (zero lamports).
                                - type: object
                                  description: SOL balance of one account.
                                  properties:
                                    account:
                                      type: string
                                      description: Account address.
                                      example: >-
                                        7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                                    amount:
                                      type: object
                                      description: SOL balance at the requested point.
                                      properties:
                                        raw:
                                          type: string
                                          description: >-
                                            Amount in base units (lamports for SOL),
                                            as a decimal string.
                                          example: '1523847120'
                                        decimals:
                                          type: integer
                                          description: Decimals of the token (9 for SOL).
                                          example: 9
                                        uiAmount:
                                          type: number
                                          description: >-
                                            Amount with decimals applied, as a
                                            number.
                                          example: 1.52384712
                                        uiAmountString:
                                          type: string
                                          description: >-
                                            Amount with decimals applied, as a
                                            string.
                                          example: '1.52384712'
                                    lastBalanceChange:
                                      type: object
                                      description: >-
                                        The balance change that produced this
                                        balance: the last change at or before
                                        the requested point. Its slot and
                                        timestamp are those of the change, not
                                        the point you asked for.
                                      properties:
                                        slot:
                                          type: integer
                                          description: Slot of the change.
                                          example: 411107934
                                        timestamp:
                                          type: integer
                                          description: >-
                                            Block time of the change, in Unix
                                            seconds.
                                          example: 1775359359
                                        previousAmount:
                                          type: object
                                          description: >-
                                            Balance before the change. Omitted when
                                            it is not known.
                                          properties:
                                            raw:
                                              type: string
                                              description: >-
                                                Amount in base units (lamports for SOL),
                                                as a decimal string.
                                              example: '1523847120'
                                            decimals:
                                              type: integer
                                              description: Decimals of the token (9 for SOL).
                                              example: 9
                                            uiAmount:
                                              type: number
                                              description: >-
                                                Amount with decimals applied, as a
                                                number.
                                              example: 1.52384712
                                            uiAmountString:
                                              type: string
                                              description: >-
                                                Amount with decimals applied, as a
                                                string.
                                              example: '1.52384712'
                                        amount:
                                          type: object
                                          description: >-
                                            Balance after the change. Same as the
                                            top-level `amount`.
                                          properties:
                                            raw:
                                              type: string
                                              description: >-
                                                Amount in base units (lamports for SOL),
                                                as a decimal string.
                                              example: '1523847120'
                                            decimals:
                                              type: integer
                                              description: Decimals of the token (9 for SOL).
                                              example: 9
                                            uiAmount:
                                              type: number
                                              description: >-
                                                Amount with decimals applied, as a
                                                number.
                                              example: 1.52384712
                                            uiAmountString:
                                              type: string
                                              description: >-
                                                Amount with decimals applied, as a
                                                string.
                                              example: '1.52384712'
                                        delta:
                                          type: object
                                          description: >-
                                            Signed change (`amount` minus
                                            `previousAmount`). Omitted when
                                            `previousAmount` is not known.
                                          properties:
                                            raw:
                                              type: string
                                              description: >-
                                                Signed amount in base units, as a
                                                decimal string; starts with `-` when the
                                                balance went down.
                                              example: '-5000'
                                            decimals:
                                              type: integer
                                              description: Decimals of the token (9 for SOL).
                                              example: 9
                                            uiAmount:
                                              type: number
                                              description: >-
                                                Amount with decimals applied, as a
                                                number.
                                              example: -0.000005
                                            uiAmountString:
                                              type: string
                                              description: >-
                                                Amount with decimals applied, as a
                                                string.
                                              example: '-0.000005'
                          found:
                            type: integer
                            description: Number of non-null entries in `balances`.
                            example: 1
              examples:
                bySlot:
                  summary: Balances at a slot
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      balances:
                        - account: 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                          amount:
                            raw: '1523847120'
                            decimals: 9
                            uiAmount: 1.52384712
                            uiAmountString: '1.52384712'
                          lastBalanceChange:
                            slot: 411107934
                            timestamp: 1775359359
                            previousAmount:
                              raw: '1523852120'
                              decimals: 9
                              uiAmount: 1.52385212
                              uiAmountString: '1.52385212'
                            amount:
                              raw: '1523847120'
                              decimals: 9
                              uiAmount: 1.52384712
                              uiAmountString: '1.52384712'
                            delta:
                              raw: '-5000'
                              decimals: 9
                              uiAmount: -0.000005
                              uiAmountString: '-0.000005'
                        - null
                      found: 1
        '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.