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

# getFeeForMessage



## OpenAPI

````yaml getfeeformessage post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getFeeForMessage
      operationId: getfeeformessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      description: The JSON-RPC protocol version.
                      enum:
                        - '2.0'
                      example: '2.0'
                      default: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                      default: '1'
                method:
                  allOf:
                    - type: string
                      description: The name of the RPC method to invoke.
                      enum:
                        - getFeeForMessage
                      example: getFeeForMessage
                      default: getFeeForMessage
                params:
                  allOf:
                    - type: array
                      description: Parameters for the method.
                      default:
                        - >-
                          AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA
                      items:
                        oneOf:
                          - type: string
                            description: >-
                              Base-64 encoded serialized Solana transaction
                              message to calculate the exact fee for.
                            example: >-
                              AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA
                          - type: object
                            description: >-
                              Configuration object containing optional
                              parameters.
                            properties:
                              commitment:
                                type: string
                                description: The commitment level for the request.
                                enum:
                                  - confirmed
                                  - finalized
                                example: finalized
                              minContextSlot:
                                type: integer
                                description: >-
                                  The minimum slot that the request can be
                                  evaluated at.
                                example: 1000
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: db16f277-1a22-41ff-9f85-f37e2cd77900
                  method: getFeeForMessage
                  params:
                    - >-
                      AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA
      responses:
        '200':
          description: Successfully retrieved the fee for the given message.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: object
                        description: Fee information for the message.
                        properties:
                          context:
                            type: object
                            description: Context of the response.
                            properties:
                              slot:
                                type: integer
                                description: The slot at which the fee was calculated.
                                example: 5068
                          value:
                            type: integer
                            nullable: true
                            description: >-
                              Exact transaction fee in lamports (1 SOL =
                              1,000,000,000 lamports) required to process this
                              specific message on the network.
                            example: 5000
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
                    result:
                      context:
                        slot: 5068
                      value: 5000
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````