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

# getBlockCommitment

> Runs the Solana RPC `getBlockCommitment` method.



## OpenAPI

````yaml getblockcommitment post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: Run `getBlockCommitment`
      description: Runs the Solana RPC `getBlockCommitment` method.
      operationId: getblockcommitment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      enum:
                        - '2.0'
                      description: The JSON-RPC protocol version.
                      default: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                      default: '1'
                method:
                  allOf:
                    - type: string
                      enum:
                        - getBlockCommitment
                      description: The name of the RPC method to invoke.
                      default: getBlockCommitment
                params:
                  allOf:
                    - type: array
                      description: Parameters for the request.
                      default:
                        - 235157119
                      items:
                        type: integer
                        description: Block number identified by Slot (as `u64` integer).
                        example: 5
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: db16f277-1a22-41ff-9f85-f37e2cd77900
                  method: getBlockCommitment
                  params:
                    - 235157119
      responses:
        '200':
          description: Successfully retrieved block commitment.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  id:
                    allOf:
                      - type: string
                  result:
                    allOf:
                      - type: object
                        properties:
                          commitment:
                            oneOf:
                              - type: 'null'
                                description: >-
                                  Returns null if the block is unknown or has
                                  not been confirmed by any validator.
                              - type: array
                                description: >-
                                  Array of `u64` integers logging the amount of
                                  cluster stake in lamports that has voted on
                                  the block at each depth.
                                items:
                                  type: integer
                                example:
                                  - 0
                                  - 0
                                  - 0
                                  - 0
                                  - 0
                                  - 10
                                  - 32
                          totalStake:
                            type: integer
                            description: >-
                              Total active stake, in lamports, of the current
                              epoch.
                            example: 384962848972206900
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    id: <string>
                    result:
                      commitment: null
                      totalStake: 384962848972206900
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32602
                      message: Invalid params
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32001
                      message: Unauthorized
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32005
                      message: Too many requests
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32603
                      message: Internal error
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32002
                      message: Service unavailable
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32003
                      message: Gateway timeout
                    id: db16f277-1a22-41ff-9f85-f37e2cd77900
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````