Partial Withdrawals

Objective

Allow validators with 0x02 withdrawal credentials to withdraw excess ETH above 32 ETH without exiting the validator.

Applicable Scenarios

  • You want to withdraw a portion of ETH from a validator while keeping it active
  • The validator is using 0x02 credentials and has a balance above 32 ETH

Endpoint

POST /api/v1/eth/staking/direct/tx/withdrawal/partial

Flow

  1. Submit the validator pubkey and the withdrawal amount (must retain at least 32 ETH in the validator).
  2. The system verifies:
    • The validator uses 0x02 withdrawal credentials
    • The validator is active and consolidated
    • The remaining balance is ≥ 32 ETH
  3. Receive a serialized withdrawal transaction ready for signing and broadcasting.

This method is supported for both Ethereum and SSV validators via the same endpoint.

Flow Example

Partial Withdrawal

Send a POST request to /api/v1/eth/staking/direct/tx/withdrawal/partial.

Example request:

curl --request POST \
  --url https://api.p2p.org/api/v1/eth/staking/direct/tx/withdrawal/partial \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  --data '{
    "pubkeys": ["0xb1c1074a8c...8ae353875d"],
    "amount": "10000000000000"
}'

Example response:

{
  "error": null,
  "result": {
    "serializeTx": "0x02f8ab8b0...",
    "to": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
    "gasLimit": "100000",
    "value": "10000000000000",
    "data": "0x",
    "chainId": 560048,
    "type": 2,
    "maxFeePerGas": "2211533588",
    "maxPriorityFeePerGas": "69385672"
  }
}