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

# getFeeForMessage

> 특정 메시지에 대해 네트워크가 부과할 수수료를 가져옵니다.

## 요청 매개변수

<ParamField body="transaction" type="string" required>
  정확한 수수료를 계산하기 위한 Base-64 인코딩된 직렬화된 Solana 트랜잭션 메시지입니다.
</ParamField>

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

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

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


## OpenAPI

````yaml ko/openapi/rpc-http/getFeeForMessage.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: getFeeForMessage
      description: >
        특정 직렬화된 Solana 메시지에 대한 정확한 거래 수수료 비용을 계산합니다.

        이 수수료 추정 API는 거래 메시지 구조에 기반한 정확한 SOL 수수료 계산을 제공하여 일반적인 수수료 추정보다 더 정확한
        결과를 제공합니다.

        사전 직렬화된 메시지 내의 정확한 작업을 분석하여 청구될 정확한 lamport 비용을 결정합니다. 

        정확한 수수료 산정이 필요한 지갑 애플리케이션, 출금 수수료를 계산하는 거래소, 거래 예산을 계획하는 DApp, 정확한 비용
        계산이 필요한 결제 처리기, 거래를 Solana 네트워크에 제출하기 전에 정확한 수수료를 알아야 하는 모든 애플리케이션에
        필수적입니다.
      operationId: getFeeForMessage
      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:
                    - getFeeForMessage
                  example: getFeeForMessage
                  default: getFeeForMessage
                params:
                  type: array
                  description: 메서드의 매개변수입니다.
                  default:
                    - >-
                      AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA
                  items:
                    oneOf:
                      - type: string
                        description: 정확한 수수료를 계산하기 위한 Base-64로 인코딩된 직렬화된 Solana 거래 메시지입니다.
                        example: >-
                          AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA
                      - type: object
                        description: 옵션 매개변수를 포함하는 구성 객체입니다.
                        properties:
                          commitment:
                            type: string
                            description: 요청에 대한 커밋 수준입니다.
                            enum:
                              - confirmed
                              - finalized
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: 요청이 평가될 수 있는 최소 슬롯입니다.
                            example: 1000
      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
                    description: 메시지에 대한 수수료 정보입니다.
                    properties:
                      context:
                        type: object
                        description: 응답의 컨텍스트입니다.
                        properties:
                          slot:
                            type: integer
                            description: 수수료가 계산된 슬롯입니다.
                            example: 5068
                      value:
                        type: integer
                        nullable: true
                        description: >-
                          이 특정 메시지를 네트워크에서 처리하는 데 필요한 정확한 lamports 단위의 거래
                          수수료입니다. (1 SOL = 1,000,000,000 lamports)
                        example: 5000
        '400':
          description: 잘못된 요청 - 요청 매개변수가 잘못되었거나 요청이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '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
          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)에서 무료로
        받을 수 있습니다.

````