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

# 💎 Transaction Withdrawals

> Returns the EIP-7002 withdrawal requests that an execution layer transaction made, identified by its hash: full exits and partial withdrawals, each with the validator it names, the amount it asks for, its sender and fee, what the consensus layer did with it, the amount it paid and the slots that did it.

A transaction can make many requests, for example through a contract that exits a batch of validators. Results are ordered by the request's position in the transaction and paginated.

The consensus layer picks the requests up out of the execution-layer request contract, which releases at most 16 withdrawal requests per block. The requests of a large transaction therefore reach the consensus layer over several blocks, and a request can wait in the contract behind earlier ones. What the consensus layer did with a request shows here once the slot that did it is finalized. Until then the request is `queued` with `queued_slot` and `processed_slot` both null.

| `type` | `status` | `queued_slot` | `processed_slot` |
|---|---|---|---|
| either | `queued`, not picked up, or picked up in a slot not finalized yet | null | null |
| `full_exit` | `completed`, the validator's exit started | null | the slot that started the exit |
| `full_exit` | `rejected` | null | the slot that rejected it |
| `partial_withdrawal` | `queued`, in the pending partial withdrawal queue | the slot that queued it | null |
| `partial_withdrawal` | `completed`, paid | the slot that queued it | the slot that paid it |
| `partial_withdrawal` | `rejected` when picked up | null | the slot that rejected it |
| `partial_withdrawal` | `rejected` when its turn in the queue came | the slot that queued it | the slot that dropped it |

Once every entry of a response is `finalized`, its outcomes and slots no longer change; `validator.index` can still appear later, when the public key of a request rejected for an unknown key gets a validator, and `is_contract` follows each address's current state.

You can combine this endpoint with:
- The validator's exit epoch, withdrawable epoch and status: [v2/ethereum/validators](/api-reference/ethereum/validators)
- The block that included the transaction: [v2/ethereum/block](/api-reference/ethereum/block/overview)
- The slots that queued and processed the requests: [v2/ethereum/slot](/api-reference/ethereum/slot/overview)

The response is `404` when the transaction made no withdrawal request, or when it is not indexed yet, as for a short time after its block.

**Premium Endpoint:** This endpoint requires a Scale or Enterprise plan.




## OpenAPI

````yaml /v3/bundled.yaml post /api/v2/ethereum/transaction/withdrawals
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/transaction/withdrawals:
    post:
      tags:
        - Block
      summary: 💎 Transaction Withdrawals
      description: >
        Returns the EIP-7002 withdrawal requests that an execution layer
        transaction made, identified by its hash: full exits and partial
        withdrawals, each with the validator it names, the amount it asks for,
        its sender and fee, what the consensus layer did with it, the amount it
        paid and the slots that did it.


        A transaction can make many requests, for example through a contract
        that exits a batch of validators. Results are ordered by the request's
        position in the transaction and paginated.


        The consensus layer picks the requests up out of the execution-layer
        request contract, which releases at most 16 withdrawal requests per
        block. The requests of a large transaction therefore reach the consensus
        layer over several blocks, and a request can wait in the contract behind
        earlier ones. What the consensus layer did with a request shows here
        once the slot that did it is finalized. Until then the request is
        `queued` with `queued_slot` and `processed_slot` both null.


        | `type` | `status` | `queued_slot` | `processed_slot` |

        |---|---|---|---|

        | either | `queued`, not picked up, or picked up in a slot not finalized
        yet | null | null |

        | `full_exit` | `completed`, the validator's exit started | null | the
        slot that started the exit |

        | `full_exit` | `rejected` | null | the slot that rejected it |

        | `partial_withdrawal` | `queued`, in the pending partial withdrawal
        queue | the slot that queued it | null |

        | `partial_withdrawal` | `completed`, paid | the slot that queued it |
        the slot that paid it |

        | `partial_withdrawal` | `rejected` when picked up | null | the slot
        that rejected it |

        | `partial_withdrawal` | `rejected` when its turn in the queue came |
        the slot that queued it | the slot that dropped it |


        Once every entry of a response is `finalized`, its outcomes and slots no
        longer change; `validator.index` can still appear later, when the public
        key of a request rejected for an unknown key gets a validator, and
        `is_contract` follows each address's current state.


        You can combine this endpoint with:

        - The validator's exit epoch, withdrawable epoch and status:
        [v2/ethereum/validators](/api-reference/ethereum/validators)

        - The block that included the transaction:
        [v2/ethereum/block](/api-reference/ethereum/block/overview)

        - The slots that queued and processed the requests:
        [v2/ethereum/slot](/api-reference/ethereum/slot/overview)


        The response is `404` when the transaction made no withdrawal request,
        or when it is not indexed yet, as for a short time after its block.


        **Premium Endpoint:** This endpoint requires a Scale or Enterprise plan.
      operationId: GetTransactionWithdrawals
      requestBody:
        $ref: '#/components/requestBodies/transactionWithdrawalsRequest'
      responses:
        '200':
          $ref: '#/components/responses/TransactionWithdrawal'
        '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:
    transactionWithdrawalsRequest:
      description: '`cursor` and `page_size` are optional in this request body'
      content:
        application/json:
          schema:
            type: object
            properties:
              tx_hash:
                $ref: '#/components/schemas/transactionHash'
                description: >-
                  Hash of the execution layer transaction that made the
                  withdrawal requests, as a 0x-prefixed hex string.
              chain:
                $ref: '#/components/schemas/Chain'
              cursor:
                $ref: '#/components/schemas/Cursor'
              page_size:
                $ref: '#/components/schemas/PageSize'
            required:
              - tx_hash
              - chain
          example:
            tx_hash: '0x30e3ab83cf6a405291a79c137dfd845810651fff02dfa9ec36d9f6298eb9d8c0'
            chain: mainnet
  responses:
    TransactionWithdrawal:
      description: Successful response.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/TransactionWithdrawal.ContainerList'
              - $ref: '#/components/schemas/PagingTemplate'
            description: >-
              Response containing the withdrawal requests of an execution layer
              transaction.
    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:
    transactionHash:
      type: string
      pattern: ^0x[a-fA-F0-9]{64}$
    Chain:
      type: string
      enum:
        - mainnet
        - hoodi
      default: mainnet
      description: The Ethereum chain to query.
    Cursor:
      type: string
      description: >-
        Cursor value for pagination. See our [pagination guide](/api/pagination)
        for more details.
      default: ''
    PageSize:
      type: integer
      description: The number of items to return per page.
      minimum: 1
      maximum: 10
      default: 10
    TransactionWithdrawal.ContainerList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TransactionWithdrawal.Data'
      required:
        - data
    PagingTemplate:
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/Paging'
    Error:
      type: object
      properties:
        error:
          type: string
    TransactionWithdrawal.Data:
      type: object
      description: A withdrawal request the transaction made.
      properties:
        validator:
          allOf:
            - $ref: '#/components/schemas/validator'
          description: >-
            The validator the request names, by public key. `index` is null
            while no validator has this public key.
        type:
          $ref: '#/components/schemas/TransactionWithdrawal.Type'
        amount:
          allOf:
            - $ref: '#/components/schemas/wei'
          nullable: true
          description: >-
            The amount the request asks to withdraw, in wei. Null for a
            `full_exit`, which names no amount. The consensus layer pays at most
            the validator's balance above 32 ETH, so `paid_amount` can be lower.
        paid_amount:
          allOf:
            - $ref: '#/components/schemas/wei'
          nullable: true
          description: >-
            The amount the consensus layer paid for a `completed`
            `partial_withdrawal`, in wei. It is lower than `amount` when the
            validator's balance above 32 ETH was lower when the request's turn
            in the queue came. Null for any other request; a `full_exit` pays
            out the validator's balance later, in the withdrawal sweep.
        status:
          allOf:
            - $ref: '#/components/schemas/ConsensusLayerEventStatus'
          description: >
            What the consensus layer did with the request:


            - `queued`: a `partial_withdrawal` waiting in the pending partial
            withdrawal queue (`queued_slot` set), or a request of either type
            the consensus layer has not picked up out of the request contract,
            or picked up in a slot that is not finalized yet (`queued_slot`
            null).

            - `completed`: a `full_exit` started the validator's exit; a
            `partial_withdrawal` was paid.

            - `rejected`: the consensus layer dropped the request when it picked
            it up, or, for a `partial_withdrawal`, when the request's turn in
            the queue came. `reject_reason` says why.
        reject_reason:
          allOf:
            - $ref: '#/components/schemas/ValidatorWithdrawals.RejectReason'
          nullable: true
          description: >-
            Why the consensus layer rejected the request. Null unless `status`
            is `rejected`.
        tx_from:
          allOf:
            - $ref: '#/components/schemas/ExecutionLayerAddressDetails'
          description: >
            The address that originally initiated the transaction (`tx.origin`).
            This is always the externally owned account (EOA) that signed the
            transaction, typically the user's wallet.

            When the user sends the transaction directly, `tx_from` and
            `tx_msg_sender` are the same. When the user interacts through a
            contract (e.g. a multisig, smart wallet, or staking service),
            `tx_from` is the user's wallet while `tx_msg_sender` is the
            contract.
        tx_msg_sender:
          allOf:
            - $ref: '#/components/schemas/ExecutionLayerAddressDetails'
          description: >
            The address that directly called the withdrawal request contract
            (`msg.sender`), the request's source address. This is the immediate
            caller: either the user's wallet (EOA) or an intermediary contract.

            When the user sends the transaction directly, this equals `tx_from`.
            When the user interacts through a contract (e.g. a multisig, smart
            wallet, or staking service), this is the contract address, not the
            user's wallet.
        fee:
          allOf:
            - $ref: '#/components/schemas/wei'
          description: The fee the request paid the withdrawal request contract, in wei.
        block:
          allOf:
            - $ref: '#/components/schemas/Block'
          description: >-
            The execution layer block that included the transaction; see
            [v2/ethereum/block](/api-reference/ethereum/block/overview).
        queued_slot:
          allOf:
            - $ref: '#/components/schemas/Slot'
          nullable: true
          description: >-
            The slot that added the `partial_withdrawal` to the pending partial
            withdrawal queue. Null for a `full_exit`, for a request the
            consensus layer rejected when it picked it up, and until the slot
            that picked the request up is finalized.
        processed_slot:
          allOf:
            - $ref: '#/components/schemas/Slot'
          nullable: true
          description: >-
            The slot that applied the request, starting the validator's exit or
            paying the partial withdrawal, or that rejected it. Null while the
            request is `queued`, which it also is until that slot is finalized.
        finality:
          allOf:
            - $ref: '#/components/schemas/FinalityParams'
          description: >-
            `finalized` once `processed_slot` is finalized, after which the
            outcome and the slots no longer change; `validator.index` can still
            appear later, when the public key gets a validator. A `queued`
            request is `not_finalized`.
      required:
        - validator
        - type
        - amount
        - paid_amount
        - status
        - reject_reason
        - tx_from
        - tx_msg_sender
        - fee
        - block
        - queued_slot
        - processed_slot
        - finality
    Paging:
      type: object
      properties:
        next_cursor:
          description: >-
            Cursor to the next page of results. See our [pagination
            guide](/api/pagination) for more details. If empty, there are no
            more pages to fetch.
          type: string
          example: eyJfc2FtcGxlX2N1cnNvciI6MTIzNDU2Nzg5MH0
    validator:
      type: object
      properties:
        index:
          allOf:
            - $ref: '#/components/schemas/validatorIndex'
          nullable: true
        public_key:
          $ref: '#/components/schemas/validatorPublicKey'
    TransactionWithdrawal.Type:
      type: string
      description: >
        The kind of withdrawal request, from the amount it names:


        - `full_exit`: an amount of 0, which asks the consensus layer to exit
        the validator. The withdrawal sweep pays out its balance once the
        validator is withdrawable.

        - `partial_withdrawal`: any other amount, which asks for part of the
        balance above 32 ETH of a validator with 0x02 withdrawal credentials.
      enum:
        - full_exit
        - partial_withdrawal
      x-enum-varnames:
        - TransactionWithdrawalTypeFullExit
        - TransactionWithdrawalTypePartialWithdrawal
      example: full_exit
    wei:
      type: string
      description: Amount in wei (1 ETH = 10^18 wei)
      pattern: ^(0|-?[1-9][0-9]*)$
      example: '32000000000000000000'
    ConsensusLayerEventStatus:
      type: string
      enum:
        - queued
        - completed
        - rejected
        - onboarded
      example: completed
      nullable: true
    ValidatorWithdrawals.RejectReason:
      type: string
      enum:
        - full_queue
        - unknown_public_key
        - no_execution_withdrawal_credentials
        - address_mismatch
        - inactive
        - exiting
        - too_young
        - pending_withdrawals
        - not_compounding
        - insufficient_effective_balance
        - excess_balance
    ExecutionLayerAddressDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/ExecutionLayerAddress'
        is_contract:
          type: boolean
      required:
        - address
        - is_contract
    Block:
      type: integer
      minimum: 0
      description: Block by number.
    Slot:
      type: integer
      minimum: 0
      description: Slot by number.
    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
      example: finalized
    validatorIndex:
      description: Validator Index
      type: integer
      minimum: 0
    validatorPublicKey:
      type: string
      description: Public key of a validator
      pattern: ^0x[a-fA-F0-9]{96}$
      example: >-
        0xab6b6d826c14b6141e3406c5227ead15b133993195e96edc05fdeba998d0e0fd96e4ec5f47f6c9eec1558a59042c03d1
    ExecutionLayerAddress:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      description: A standard Ethereum address (20-byte hex string with 0x prefix).
      example: '0x388C818CA8B9251b393131C08a736A67ccB19297'
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.