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

# getHistoricalAccountInfo

> 과거 슬롯 또는 특정 트랜잭션 직후의 Solana 계정을 getAccountInfo 인코딩 및 마지막 쓰기 위치와 함께 읽습니다.

> [!NOTE]
>
> `getHistoricalAccountInfo`은 베타 버전입니다. 매개변수, 가격, 응답 형식 및 데이터 제공 범위는 변경될 수 있습니다.

## 개요

`getHistoricalAccountInfo`은 과거 슬롯 또는 해당 슬롯의 특정 트랜잭션 직후 시점의 Solana 계정을 반환합니다. Helius 전용 RPC 메서드입니다. 표준 `getAccountInfo`은 현재 상태만 반환합니다.

응답에는 `getAccountInfo`과 동일한 계정 필드와 함께 `lastUpdatedAt`이 포함됩니다. 이는 반환된 상태를 마지막으로 기록한 슬롯과 트랜잭션입니다.

기록은 에포크 1030이 시작될 때의 상태인 슬롯 444,959,999(2026년 9월 7일)부터 제공됩니다. 이보다 이전 슬롯을 요청하면 오류 `-32018`이 반환됩니다.

`getHistoricalAccountInfo`은 Business 이상의 요금제에서 메인넷을 통해 사용할 수 있으며, 베타 기간에는 호출당 0크레딧이 부과됩니다. 가격은 변경될 수 있습니다.

## 기록에서 위치 선택

두 번째 매개변수는 기록에서 읽을 시점을 선택하는 쿼리 객체입니다.

| 쿼리 | 반환되는 계정 시점 |
| - | - |
| 생략 또는 `{}` | 요청한 커밋먼트로 제한된 최신 인덱싱 슬롯 |
| `{ "slot": 445000000 }` | 슬롯 445,000,000의 끝 |
| `{ "slot": 445000000, "transactionIndex": 10 }` | 슬롯 445,000,000의 인덱스 10에 있는 트랜잭션이 실행된 직후 |

`transactionIndex`을 사용하려면 `slot`이 필요합니다. 인덱스 `N`의 트랜잭션 직전 계정을 읽으려면 `transactionIndex: N - 1`을 쿼리하세요. 슬롯의 첫 번째 트랜잭션 직전 상태를 확인하려면 `transactionIndex` 없이 이전 슬롯을 쿼리하세요.

에포크 보상과 같이 트랜잭션을 통하지 않는 쓰기는 슬롯 끝에 적용됩니다. `transactionIndex`을 사용한 쿼리에는 이러한 쓰기가 포함되지 않습니다.

## 요청 예시

```bash theme={"system"}
curl https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "getHistoricalAccountInfo",
    "params": [
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      { "slot": 445000000 },
      { "encoding": "jsonParsed" }
    ]
  }'
```

## 응답 읽기

* \*\*`value`\*\*은 요청한 위치의 계정입니다. 당시 계정이 아직 생성되지 않았거나 이미 폐쇄되어 존재하지 않았다면 `null`입니다. `null` 응답에는 `lastUpdatedAt`이 없습니다.
* \*\*`lastUpdatedAt.slot`\*\*과 \*\*`lastUpdatedAt.transactionIndex`\*\*은 이 상태를 만든 쓰기를 식별합니다. 해당 쓰기는 요청한 위치 또는 그 이전에 있습니다.
* 에포크 보상처럼 트랜잭션 외부에서 쓰기가 발생한 경우 **`lastUpdatedAt.transactionIndex`은 `null`입니다**.
* \*\*`null` `transactionIndex`을 포함하는 444,959,999의 `lastUpdatedAt.slot`\*\*은 기록 제공이 시작된 이후 계정이 변경되지 않았음을 의미합니다. 해당 슬롯에서 계정에 쓰기가 발생했다는 의미는 아닙니다.
* \*\*`context.slot`\*\*은 쿼리한 슬롯이 아니라 Helius가 요청을 처리할 당시 인덱싱한 최신 슬롯입니다.
* **`jsonParsed` 토큰 계정**은 요청한 위치를 기준으로 민트의 소수 자릿수를 사용합니다. 해당 위치에서 민트를 읽을 수 없으면 계정은 base64를 대신 사용합니다.

계정의 모든 과거 상태를 나열하려면 `lastUpdatedAt`을 커서로 사용하세요. [계정 기록을 역순으로 탐색하기](https://www.helius.dev/docs/ko/rpc/historical-accounts.md#계정-기록을-역순으로-탐색하기)를 참조하세요.

## 오류

| 코드 | 의미 |
| - | - |
| `-32018` | 슬롯이 기록 제공 시작 지점(슬롯 444,959,999)보다 이전입니다 |
| `-32004` | 슬롯이 요청한 커밋먼트에서 허용하는 범위보다 최신입니다. `confirmed`을 사용하거나 더 오래된 슬롯을 쿼리하세요 |
| `-32602` | `slot` 없는 `transactionIndex`, `base58` 인코딩 또는 알 수 없는 구성 필드와 같은 잘못된 매개변수입니다 |
| `-32601` | 메서드를 찾을 수 없습니다. Helius 메인넷 또는 Gatekeeper 엔드포인트를 호출하세요. 이 메서드는 devnet에서 사용할 수 없습니다 |

## 관련 메서드

> [card] [Historical Accounts Guide](https://www.helius.dev/docs/ko/rpc/historical-accounts.md)
>
> 과거 계정 메서드에서 위치, 제공 범위 및 lastUpdatedAt이 작동하는 방식

> [card] [getHistoricalTokenAccountsByOwner](https://www.helius.dev/docs/ko/api-reference/rpc/http/gethistoricaltokenaccountsbyowner.md)
>
> 과거 슬롯에서 지갑의 토큰 계정 나열하기

> [card] [getTransactionsForAddress](https://www.helius.dev/docs/ko/rpc/gettransactionsforaddress.md)
>
> 검사하려는 트랜잭션의 슬롯과 transactionIndex 찾기

> [card] [getAccountInfo](https://www.helius.dev/docs/ko/api-reference/rpc/http/getaccountinfo.md)
>
> 계정의 현재 상태 읽기

## 요청 매개변수

**pubkey** `string` *required*

읽을 계정의 Base-58 인코딩 주소입니다.

**slot** `number`

상태를 읽을 슬롯입니다. 이 슬롯이 끝난 시점의 계정을 반환합니다. 지원되는 가장 이른 슬롯은 에포크 1030이 시작될 때의 상태인 444959999입니다. 생략하면 요청한 커밋먼트로 제한된 최신 인덱싱 슬롯을 읽습니다.

**transactionIndex** `number`

슬롯 내 트랜잭션의 위치입니다. 슬롯 끝이 아닌 해당 트랜잭션이 실행된 직후의 계정 상태를 반환합니다. slot이 필요합니다.

**encoding** `string` (default: base64)

계정 데이터의 인코딩 형식입니다. base58과 binary는 지원되지 않습니다.

* `base64`
* `base64+zstd`
* `jsonParsed`

**dataSlice** `object`

각 계정 데이터의 일부만 반환합니다. base64 및 base64+zstd 인코딩에 적용됩니다.

**dataSlice.offset** `number` *required*

읽기를 시작할 바이트 오프셋입니다.

**dataSlice.length** `number` *required*

반환할 바이트 수입니다.

**commitment** `string` (default: finalized)

커밋먼트 수준입니다. processed는 지원되지 않습니다.

* `finalized`
* `confirmed`

**minContextSlot** `number`

요청을 평가할 수 있는 최소 슬롯입니다.


## OpenAPI

````yaml ko/openapi/rpc-http/getHistoricalAccountInfo.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 과거 슬롯의 시점 또는 슬롯 내 특정 트랜잭션 직후의 Solana 계정 상태를 읽는 과거 Solana 계정 상태 API입니다.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: 메인넷 RPC 엔드포인트
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getHistoricalAccountInfo
      description: |
        **베타.** 매개변수, 응답 형식 및 데이터 범위는 변경될 수 있습니다.

        과거 슬롯의 시점 또는 해당 슬롯 내 특정 트랜잭션 직후의 Solana 계정을
        반환합니다. 이 Helius RPC 메서드는 getAccountInfo와 동일한 주소 및
        인코딩 옵션과 함께 읽을 과거 시점을 선택하는 쿼리 객체를 사용합니다.

        과거 데이터는 슬롯 444959999(에포크 1030의 시작)부터 제공됩니다. 반환되는 각 계정에는
        수신한 상태가 마지막으로 기록된 슬롯과 트랜잭션을 나타내는 lastUpdatedAt이
        포함됩니다.
      operationId: getHistoricalAccountInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  example: '2.0'
                  description: JSON-RPC 프로토콜 버전입니다.
                  default: '2.0'
                id:
                  type: string
                  example: '1'
                  description: 요청의 고유 식별자입니다.
                  default: '1'
                method:
                  type: string
                  enum:
                    - getHistoricalAccountInfo
                  example: getHistoricalAccountInfo
                  description: 호출할 RPC 메서드의 이름입니다.
                  default: getHistoricalAccountInfo
                params:
                  type: array
                  description: 계정 주소, 과거 시점을 선택하는 선택적 쿼리 객체 및 선택적 구성 객체가 포함된 배열입니다.
                  minItems: 1
                  maxItems: 3
                  default:
                    - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    - slot: 445000000
                    - encoding: jsonParsed
                  items:
                    oneOf:
                      - type: string
                        title: 공개 키
                        description: 읽을 계정의 Base-58 인코딩 주소입니다.
                        example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      - $ref: '#/components/schemas/HistoricalAccountQuery'
                        title: 쿼리
                      - type: object
                        title: 구성
                        description: 선택적 구성 객체입니다.
                        properties:
                          encoding:
                            type: string
                            description: 계정 데이터의 인코딩 형식입니다. base58 및 binary는 지원되지 않습니다.
                            enum:
                              - base64
                              - base64+zstd
                              - jsonParsed
                            default: base64
                            example: jsonParsed
                          dataSlice:
                            $ref: '#/components/schemas/DataSliceConfig'
                          commitment:
                            type: string
                            description: 커밋 수준입니다. processed는 지원되지 않습니다.
                            enum:
                              - finalized
                              - confirmed
                            default: finalized
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: 요청을 평가할 수 있는 최소 슬롯입니다.
                            example: 445000000
                        additionalProperties: false
      responses:
        '200':
          description: 과거 계정 상태를 성공적으로 조회했습니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC 프로토콜 버전입니다.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: 요청과 일치하는 식별자입니다.
                    example: '1'
                  result:
                    type: object
                    properties:
                      context:
                        $ref: '#/components/schemas/HistoricalContext'
                      value:
                        oneOf:
                          - $ref: '#/components/schemas/HistoricalAccount'
                          - type: 'null'
                        description: 요청한 위치의 계정입니다. 당시 존재하지 않았다면 null입니다.
        '400':
          description: 잘못된 요청 - 요청 매개변수가 유효하지 않거나 요청 형식이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 유효하지 않은 매개변수
                id: '1'
        '401':
          description: 인증되지 않음 - API 키가 유효하지 않거나 누락되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 인증되지 않음
                id: '1'
        '429':
          description: 요청이 너무 많음 - 요청 한도를 초과했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: 요청이 너무 많음
                id: '1'
        '500':
          description: 내부 서버 오류 - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 내부 오류
                id: '1'
        '503':
          description: 서비스를 사용할 수 없음 - 서비스를 일시적으로 사용할 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: 서비스를 사용할 수 없음
                id: '1'
        '504':
          description: 게이트웨이 시간 초과 - 요청 시간이 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: 게이트웨이 시간 초과
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    HistoricalAccountQuery:
      type: object
      description: 읽을 과거 시점을 지정합니다. 최신 인덱싱 슬롯을 읽으려면 생략하거나 빈 객체를 전송하세요.
      properties:
        slot:
          type: integer
          description: >-
            상태를 읽을 슬롯입니다. 이 슬롯이 끝난 시점의 계정을 반환합니다. 지원되는 가장 이른 슬롯은 444959999이며, 이는
            에포크 1030 시작 시점의 상태입니다. 생략하면 요청한 커밋 수준을 상한으로 최신 인덱싱 슬롯을 읽습니다.
          minimum: 444959999
          example: 445000000
        transactionIndex:
          type: integer
          description: >-
            슬롯 내 트랜잭션의 위치입니다. 슬롯 종료 시점 대신 해당 트랜잭션이 실행된 직후의 계정 상태를 반환합니다. slot이
            필요합니다.
          minimum: 0
          maximum: 16777214
          example: 10
      additionalProperties: false
    DataSliceConfig:
      type: object
      description: 각 계정 데이터의 일부만 반환합니다. base64 및 base64+zstd 인코딩에 적용됩니다.
      properties:
        offset:
          type: integer
          description: 읽기를 시작할 바이트 오프셋입니다.
          example: 0
        length:
          type: integer
          description: 반환할 바이트 수입니다.
          example: 8
      required:
        - offset
        - length
    HistoricalContext:
      type: object
      description: 응답 메타데이터입니다.
      properties:
        slot:
          type: integer
          description: 과거 데이터 저장소가 요청을 처리할 당시 인덱싱한 최신 슬롯입니다. 조회한 슬롯이 아닙니다.
          example: 468129571
    HistoricalAccount:
      type: object
      description: 요청한 위치에서의 계정 상태와 해당 상태가 마지막으로 기록된 위치입니다.
      properties:
        lamports:
          type: integer
          description: 이 계정에 할당된 lamport 수입니다.
          example: 531589475273
        owner:
          type: string
          description: 이 계정이 할당된 프로그램의 Base-58 인코딩 공개 키입니다.
          example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
        data:
          description: >-
            계정 데이터입니다. base64 또는 base64+zstd를 사용하면 인코딩된 데이터와 인코딩 방식으로 구성된 2개 항목의
            배열입니다. jsonParsed를 사용하면 program, parsed, space가 포함된 객체입니다. 파싱할 수 없는
            계정은 base64 배열로 대체됩니다.
          oneOf:
            - type: array
              items:
                type: string
            - type: object
              properties:
                program:
                  type: string
                  description: 계정을 소유한 프로그램의 이름입니다.
                  example: spl-token
                parsed:
                  type: object
                  description: 프로그램별로 파싱된 계정 상태입니다.
                space:
                  type: integer
                  description: 계정의 데이터 크기입니다.
                  example: 82
        executable:
          type: boolean
          description: 계정에 프로그램이 포함되어 있는지 여부입니다.
          example: false
        rentEpoch:
          type: integer
          description: 이 계정에 다음 임대료가 부과되는 에포크입니다. 임대료 면제 계정은 최대 u64 값을 반환합니다.
        space:
          type: integer
          description: 계정 데이터의 바이트 크기입니다.
          example: 82
        lastUpdatedAt:
          $ref: '#/components/schemas/AccountWritePosition'
      required:
        - lamports
        - owner
        - data
        - executable
        - rentEpoch
        - space
        - lastUpdatedAt
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC 프로토콜 버전입니다.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 오류 코드입니다.
              example: -32602
            message:
              type: string
              description: 오류 메시지입니다.
            data:
              type: object
              description: 오류에 관한 추가 데이터입니다.
        id:
          type: string
          description: 요청과 일치하는 식별자입니다.
          example: '1'
    AccountWritePosition:
      type: object
      description: 요청한 위치 또는 그 이전에 반환된 상태가 마지막으로 기록된 위치입니다.
      properties:
        slot:
          type: integer
          description: >-
            마지막 쓰기 작업의 슬롯입니다. 값이 444959999이고 transactionIndex가 null이면 과거 데이터 범위가
            시작된 이후 계정이 변경되지 않았음을 의미합니다.
          example: 444999837
        transactionIndex:
          oneOf:
            - type: integer
            - type: 'null'
          description: >-
            마지막 쓰기 작업을 수행한 트랜잭션의 위치입니다. 쓰기 작업이 트랜잭션 외부에서 발생했거나(예: 에포크 보상), 과거
            데이터 범위가 시작된 이후 계정이 변경되지 않은 경우 null입니다.
          example: 700
      required:
        - slot
        - transactionIndex
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Helius API 키입니다. [대시보드](https://dashboard.helius.dev/api-keys)에서 무료로
        발급받을 수 있습니다.

````

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