> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beaconcha.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Details

> Offers detailed insights into the execution layer rewards for a specific block, including transaction fees and MEV (Maximal Extractable Value). 

You can query using a block number or the keywords "latest" / "finalized".




## OpenAPI

````yaml /v3/bundled.yaml post /api/v2/ethereum/block/rewards
openapi: 3.0.4
info:
  title: External Service API
  version: 1.0.3
servers:
  - url: https://beaconcha.in
    description: Production API
security:
  - ApiKeyAuth: []
paths:
  /api/v2/ethereum/block/rewards:
    post:
      tags:
        - Block
      summary: Details
      description: >
        Offers detailed insights into the execution layer rewards for a specific
        block, including transaction fees and MEV (Maximal Extractable Value). 


        You can query using a block number or the keywords "latest" /
        "finalized".
      operationId: GetBlockRewards
      requestBody:
        $ref: '#/components/requestBodies/BlockAndChain'
      responses:
        '200':
          $ref: '#/components/responses/BlockReward'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/DefaultError'
components:
  requestBodies:
    BlockAndChain:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/NamedChain'
              - $ref: '#/components/schemas/NamedBlockSelector'
            required:
              - block
          example:
            block:
              view: latest
            chain: mainnet
  responses:
    BlockReward:
      description: Successful response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BlockReward.Container'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad request. Please check your input and try again.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized. Please provide a valid API key.
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              endpoint not allowed for your subscription tier. upgrade your
              subscription at https://beaconcha.in/pricing.
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: The requested resource was not found.
    MethodNotAllowed:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'method not allowed: GET. all public API endpoints use POST.'
    RateLimitExceeded:
      description: Rate Limit Exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded. Please try again later.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal server error. please try again later.
    DefaultError:
      description: An unexpected error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: An unexpected error occurred.
  schemas:
    NamedChain:
      type: object
      properties:
        chain:
          $ref: '#/components/schemas/Chain'
    NamedBlockSelector:
      type: object
      properties:
        block:
          $ref: '#/components/schemas/BlockSelector'
      required:
        - block
    BlockReward.Container:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BlockReward.Data'
      description: Response containing basic information about the block reward.
      required:
        - data
    Error:
      type: object
      properties:
        error:
          type: string
    Chain:
      type: string
      enum:
        - mainnet
        - hoodi
      default: mainnet
      description: The Ethereum chain to query.
    BlockSelector:
      description: |
        Specify a block using one of the following methods.
        - Block number
        - View: "latest" or "finalized" 
      oneOf:
        - $ref: '#/components/schemas/BlockByNumber'
        - $ref: '#/components/schemas/BlockByChainView'
      default: latest
    BlockReward.Data:
      type: object
      properties:
        total_reward:
          $ref: '#/components/schemas/rewardDetails'
          description: >
            Total rewards earned by the block proposer or miner for this block.


            This value represents the complete amount received by the proposer
            or miner, including all relevant rewards such as priority fees and
            MEV (Maximal Extractable Value). 


            Note: The sum of individual reward components (e.g., priority fees
            and MEV) may not exactly match this value, as MEV rewards already
            include priority fees. 

            Use this field to determine the total earnings for the proposer or
            miner of the block.
        priority_fees:
          $ref: '#/components/schemas/rewardDetails'
          description: >
            Details about transaction priority fees for both PoW and PoS blocks.


            Prior to EIP-1559 (introduced in the London hardfork in August
            2021), priority fees were equivalent to gas tips paid by users to
            incentivize miners/validators to include their transactions in
            blocks.

            Post EIP-1559, priority fees represent the total tips above the base
            fee that users pay to miners/validators.


            Since EIP-4844 (introduced in the Dencun hardfork), priority fees
            also include fees from blob transactions.


            Note: Whenever MEV rewards are present, it is likely that the
            recepient of priority fees is the block builder rather then the
            proposer / miner.
        mev:
          allOf:
            - $ref: '#/components/schemas/rewardDetails'
          nullable: true
          description: >
            Information about the Maximal Extractable Value (MEV) rewards for
            blocks after the Merge.

            If present, it includes the priority fees already.


            Note: For non-finalized blocks, MEV information may not be
            immediately available. A null value for non-finalized blocks means
            either no MEV was present or the data is not yet available. For
            finalized blocks, null indicates that no MEV was present.
        mining:
          $ref: '#/components/schemas/BlockReward.Mining'
        execution_reference:
          $ref: '#/components/schemas/ExecutionLayerReference'
        consensus_reference:
          $ref: '#/components/schemas/ConsensusLayerReference'
          nullable: true
        finality:
          $ref: '#/components/schemas/FinalityParams'
      required:
        - total_reward
        - execution_reference
        - priority_fees
    BlockByNumber:
      title: Number
      type: object
      properties:
        number:
          $ref: '#/components/schemas/Block'
      required:
        - number
    BlockByChainView:
      title: View
      type: object
      properties:
        view:
          $ref: '#/components/schemas/ChainView'
      required:
        - view
    rewardDetails:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/wei'
        recipient:
          $ref: '#/components/schemas/ExecutionLayerAddressDetails'
      required:
        - amount
        - recipient
    BlockReward.Mining:
      type: object
      nullable: true
      description: >
        Information about the mining rewards for proof-of-work era blocks prior
        to the Merge.
      properties:
        recipient:
          $ref: '#/components/schemas/ExecutionLayerAddressDetails'
        static_block_reward:
          $ref: '#/components/schemas/wei'
          description: The flat reward for mining a block in the PoW era
        uncle_inclusion_reward:
          $ref: '#/components/schemas/wei'
          description: The reward for including uncle blocks in the PoW era
      required:
        - recipient
        - static_block_reward
        - uncle_inclusion_reward
    ExecutionLayerReference:
      type: object
      description: |
        Reference to an execution layer block if one exists for the given slot.
        This will be null for missed slots.
      properties:
        block:
          $ref: '#/components/schemas/Block'
        hash:
          $ref: '#/components/schemas/ExecutionLayerBlockHash'
      required:
        - block
        - hash
    ConsensusLayerReference:
      type: object
      description: |
        Reference to a consensus layer block if one exists for the given slot.
        This will be null for the PoW era.
      nullable: true
      properties:
        slot:
          $ref: '#/components/schemas/Slot'
        block_root:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ConsensusLayerBlockRoot'
        epoch:
          $ref: '#/components/schemas/Epoch'
      required:
        - slot
        - epoch
    FinalityParams:
      type: string
      description: |
        Indicates the finality status of the data provided. 
          - Finalized data cannot be changed without slashing at least one-third of all validators, providing strong economic guarantees.
          - Data marked as not_finalized does not have this guarantee and may still change.
      enum:
        - not_finalized
        - finalized
    Block:
      type: integer
      minimum: 0
      description: Block by number.
    ChainView:
      type: string
      enum:
        - latest
        - finalized
      description: >
        - "latest": Refers to the most recent block, which may be subject to
        reorganization.

        - "finalized": Refers to the latest block that has been finalized and is
        not subject to change.
    wei:
      type: string
      description: Amount in wei (1 ETH = 10^18 wei)
      pattern: ^(0|-?[1-9][0-9]*)$
    ExecutionLayerAddressDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/ExecutionLayerAddress'
        is_contract:
          type: boolean
      required:
        - address
        - is_contract
    ExecutionLayerBlockHash:
      type: string
      pattern: ^0x[a-fA-F0-9]{64}$
      description: A 32-byte block hash represented as a hex string with 0x prefix.
    Slot:
      type: integer
      minimum: 0
      description: Slot by number.
    ConsensusLayerBlockRoot:
      type: string
      pattern: ^0x[a-fA-F0-9]{64}$
      description: A 32-byte block root represented as a hex string with 0x prefix.
    Epoch:
      type: integer
      minimum: 0
    ExecutionLayerAddress:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      description: A standard Ethereum address (20-byte hex string with 0x prefix).
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization header with value: Bearer YOUR_TOKEN. Refer to the [API
        Keys](/api/overview#api-keys) section to create your API key.

````