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

# getBlocks

> 두 슬롯 사이의 확인된 블록 목록을 반환합니다.

## 요청 매개변수

<ParamField body="slot" type="number" required>
  시작 슬롯 (필수).
</ParamField>

<ParamField body="slot" type="number" required>
  종료 슬롯 (선택 사항, 시작 슬롯으로부터 최대 500,000 블록 이하여야 합니다).
</ParamField>

<ParamField body="commitment" type="string" default="finalized">
  요청에 대한 커밋 수준입니다.

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


## OpenAPI

````yaml ko/openapi/rpc-http/getBlocks.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  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: 디브넷 RPC 엔드포인트
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBlocks
      description: 시작 슬롯과 끝 슬롯 사이의 확인된 블록을 반환합니다.
      operationId: getBlocks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: JSON-RPC 프로토콜 버전입니다.
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 요청의 고유 식별자입니다.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getBlocks
                  description: 호출할 RPC 메서드의 이름입니다.
                  example: getBlocks
                  default: getBlocks
                params:
                  type: array
                  description: 메서드에 대한 요청 파라미터입니다.
                  default:
                    - 5
                    - 10
                    - commitment: finalized
                  items:
                    oneOf:
                      - type: integer
                        description: 시작 슬롯(필수)입니다.
                        example: 5
                      - type: integer
                        description: 끝 슬롯(옵션, 시작 슬롯으로부터 최대 500,000 블록 이하)입니다.
                        example: 10
                      - type: object
                        description: >-
                          커밋먼트는 그 시점에서 블록이 얼마나 확정되었는지를 설명합니다. "processed"는 지원되지
                          않습니다.
                        properties:
                          commitment:
                            type: string
                            description: 요청의 커밋먼트 수준입니다.
                            enum:
                              - confirmed
                              - finalized
                            default: finalized
      responses:
        '200':
          description: 확인된 블록을 성공적으로 가져왔습니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: 요청과 일치하는 식별자입니다.
                    example: '1'
                  result:
                    type: array
                    description: start_slot과 end_slot 사이의 확인된 블록 목록입니다.
                    items:
                      type: integer
                    example:
                      - 5
                      - 6
                      - 7
                      - 8
                      - 9
                      - 10
        '400':
          description: 잘못된 요청 - 요청 파라미터가 잘못되었거나 요청이 형식에 맞지 않습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
        '401':
          description: 인증 실패 - 잘못되었거나 누락된 API 키입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: 요청이 너무 많음 - 속도 제한이 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: 내부 서버 오류 - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: 서비스 이용 불가 - 서비스가 일시적으로 이용 불가합니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: 게이트웨이 타임아웃 - 요청 시간이 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
          description: JSON-RPC 프로토콜 버전입니다.
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 오류 코드입니다.
              example: -32602
            message:
              type: string
              description: 오류 메시지입니다.
              example: Invalid params
        id:
          type: string
          description: 요청의 고유 식별자입니다.
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        당신의 Helius API 키입니다. [대시보드](https://dashboard.helius.dev/api-keys)에서 무료로
        받을 수 있습니다.

````