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

# getProgramAccounts

> 제공된 프로그램 Pubkey가 소유한 모든 계정을 반환합니다.

<Info>
  **새로운 기능**: `getProgramAccounts`가 이제 증가 업데이트를 위한 `changedSinceSlot` 매개변수를 지원합니다. 지정할 경우, 이 메서드는 주어진 슬롯 번호 이후에 수정된 계정만 반환합니다. 실시간 인덱싱 및 데이터 동기화 워크플로에 적합합니다.
</Info>

## 요청 매개변수

<ParamField body="address" type="string" required>
  계정을 조회할 Solana 프로그램 공개 키(주소)를 base-58 인코딩 문자열로 입력합니다.
</ParamField>

<ParamField body="commitment" type="string">
  요청에 대한 커밋먼트 레벨입니다.

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="minContextSlot" type="number">
  요청이 평가될 수 있는 최소 슬롯입니다.
</ParamField>

<ParamField body="withContext" type="boolean">
  결과를 RpcResponse JSON 객체로 래핑합니다.
</ParamField>

<ParamField body="encoding" type="string">
  반환된 계정 데이터의 인코딩 형식입니다.

  * `jsonParsed`
  * `base58`
  * `base64`
  * `base64+zstd`
</ParamField>

<ParamField body="dataSlice" type="object">
  계정 데이터의 일부분을 요청합니다.
</ParamField>

<ParamField body="dataSlice.length" type="number">
  반환할 바이트 수입니다.
</ParamField>

<ParamField body="dataSlice.offset" type="number">
  읽기를 시작할 바이트 오프셋입니다.
</ParamField>

<ParamField body="changedSinceSlot" type="number">
  이 슬롯 번호 이후에 수정된 계정만 반환합니다. 증분 업데이트에 유용합니다.
</ParamField>

<ParamField body="filters" type="array">
  특정 Solana 계정 데이터 패턴을 효율적으로 쿼리하기 위한 강력한 필터링 시스템입니다.
</ParamField>


## OpenAPI

````yaml ko/openapi/rpc-http/getProgramAccounts.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    특정 프로그램이 소유한 계정을 쿼리하고 필터링하기 위한 고급 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 엔드포인트
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC 엔드포인트
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getProgramAccounts
      description: |
        강력한 필터링 기능을 사용하여 특정 Solana 프로그램이 소유한 모든 계정을 검색합니다.
        이 필수 API는 개발자가 고급 계정 크기 필터링, 메모리 콘텐츠 및 기타 기준을 통해
        모든 프로그램에서 사용되는 온체인 데이터 구조를 효율적으로 쿼리할 수 있게 합니다.
        NFT 컬렉션, DEX 유동성 풀, 대출 포지션, 거버넌스 제안 및 Solana 블록체인에 저장된 기타 프로토콜
        특정 데이터 인덱싱에 적합합니다. 최적의 구문 분석 효율성을 위해 여러 데이터 인코딩
        형식을 지원합니다.
      operationId: getProgramAccounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPC 프로토콜 버전입니다.
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 요청을 위한 고유 식별자입니다.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 호출할 RPC 메서드의 이름입니다.
                  enum:
                    - getProgramAccounts
                  example: getProgramAccounts
                  default: getProgramAccounts
                params:
                  type: array
                  description: 메서드의 매개변수입니다.
                  default:
                    - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                  items:
                    oneOf:
                      - type: string
                        description: 쿼리할 Solana 프로그램 공개 키(주소)로 base-58로 인코딩된 문자열입니다.
                        example: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                      - type: object
                        description: 프로그램 계정 쿼리를 최적화하기 위한 고급 구성 옵션입니다.
                        properties:
                          commitment:
                            type: string
                            description: 요청의 커밋 수준입니다.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: 요청이 평가될 수 있는 최소 슬롯입니다.
                            example: 1000
                          withContext:
                            type: boolean
                            description: 결과를 RpcResponse JSON 객체에 래핑합니다.
                            example: true
                          encoding:
                            type: string
                            description: 반환된 계정 데이터의 인코딩 형식입니다.
                            enum:
                              - jsonParsed
                              - base58
                              - base64
                              - base64+zstd
                            example: jsonParsed
                          dataSlice:
                            type: object
                            description: 계정의 데이터 슬라이스를 요청합니다.
                            properties:
                              length:
                                type: integer
                                description: 반환할 바이트 수입니다.
                                example: 50
                              offset:
                                type: integer
                                description: 읽기를 시작할 바이트 오프셋입니다.
                                example: 0
                          changedSinceSlot:
                            type: integer
                            description: 이 슬롯 번호 이후 또는 그때 수정된 계정만 반환합니다. 증분 업데이트에 유용합니다.
                            example: 464175999
                          filters:
                            type: array
                            description: >-
                              특정 Solana 계정 데이터 패턴을 효율적으로 쿼리할 수 있는 강력한 필터링
                              시스템입니다.
                            items:
                              oneOf:
                                - type: object
                                  description: Solana 계정을 바이트 단위의 정확한 데이터 크기로 필터링합니다.
                                  properties:
                                    dataSize:
                                      type: integer
                                      description: 필터링을 위한 계정 데이터의 정확한 크기(바이트)입니다.
                                      example: 17
                                - type: object
                                  description: >-
                                    특정 메모리 오프셋의 데이터 비교를 통해 Solana 계정을 필터링합니다 (가장
                                    강력한 필터).
                                  properties:
                                    memcmp:
                                      type: object
                                      description: 특정 데이터 패턴을 가진 계정을 찾기 위한 메모리 비교 필터입니다.
                                      properties:
                                        offset:
                                          type: integer
                                          description: 비교를 수행할 계정 데이터 내의 바이트 오프셋입니다.
                                          example: 4
                                        bytes:
                                          type: string
                                          description: 지정된 오프셋 위치에서 비교할 base-58로 인코딩된 데이터입니다.
                                          example: 3Mc6vR
      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:
                    oneOf:
                      - type: array
                        description: 프로그램 계정 목록입니다.
                        items:
                          type: object
                          properties:
                            pubkey:
                              type: string
                              description: 계정의 Pubkey로 base-58로 인코딩된 문자열입니다.
                              example: CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY
                            account:
                              type: object
                              description: 계정에 대한 세부정보입니다.
                              properties:
                                lamports:
                                  type: integer
                                  description: 이 계정에 할당된 lamports의 수입니다.
                                  example: 15298080
                                owner:
                                  type: string
                                  description: 이 계정이 할당된 프로그램의 base-58로 인코딩된 Pubkey입니다.
                                  example: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                                data:
                                  type: array
                                  description: 인코딩된 이진 또는 JSON 형식의 계정 데이터입니다.
                                  items:
                                    type: string
                                  example:
                                    - 2R9jLfiAQ9bgdcw6h8s44439
                                    - base58
                                executable:
                                  type: boolean
                                  description: 계정이 프로그램을 포함하고 있는지를 나타냅니다.
                                  example: false
                                rentEpoch:
                                  type: integer
                                  description: 이 계정이 다음으로 임대료를 지불할 시점의 에포크입니다.
                                  example: 28
                                space:
                                  type: integer
                                  description: 계정의 데이터 크기입니다.
                                  example: 42
        '400':
          description: 잘못된 요청 - 요청 매개변수 또는 요청 형식이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 유효하지 않은 매개변수
                  data: {}
                id: '1'
        '401':
          description: 인증되지 않음 - 유효하지 않거나 누락된 API 키.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 인증되지 않음
                  data: {}
                id: '1'
        '429':
          description: 요청이 너무 많음 - 할당량 초과.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: 요청이 너무 많음
                  data: {}
                id: '1'
        '500':
          description: 내부 서버 오류 - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 내부 오류
                  data: {}
                id: '1'
        '503':
          description: 서비스 이용 불가 - 서비스가 일시적으로 이용할 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: 서비스 이용 불가
                  data: {}
                id: '1'
        '504':
          description: 게이트웨이 시간 초과 - 요청이 시간 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: 게이트웨이 시간 초과
                  data: {}
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    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'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        귀하의 Helius API 키입니다. 무료로 [대시보드](https://dashboard.helius.dev/api-keys)에서
        얻을 수 있습니다.

````