Withdrawal

The Pooled Staking API allows users to initiate and complete withdrawal (unstake) of their staked ETH at any time.
Withdrawal is a two-step process due to the Ethereum exit queue and protocol constraints:

  • Initiate withdrawal:
    Build and submit an exit (withdrawal) transaction.
  • Claim ETH:
    After the exit period, claim the withdrawn ETH to the user’s wallet.

Get an authentication token to start using Staking API.

Request examples are provided using cURL.

1. Initiate Withdrawal

Create an unsigned withdrawal transaction for a specific staker and vault.

Send a POST request to /api/v1/eth-pool/[network]/staking/withdraw

Example request (for hoodi network):

curl --request POST \
     --url https://api.p2p.org/api/v1/eth-pool/[network]/staking/withdraw \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --data '{
       "stakerAddress": "0x092Af80778ff3c3D27Fd2744C39f6e9326d9AaEe",
       "vaultAddress": "0xba447498dc4c169f2b4f427b2c4d532320457e89",
       "amount": 0.01
     }'
  • stakerAddress — Ethereum address of the user requesting withdrawal.
  • vaultAddress — Vault from which funds will be withdrawn.
  • amount — Amount of ETH to unstake (decimal, e.g., 0.01).

Example response:

{
  "result": {
    "unsignedTransaction": {
      "to": "0xba447498dc4c169f2b4f427b2c4d532320457e89",
      "data": "0x2eb2c2d6000000000000000000000000092af80778ff3c3d27fd2744c39f6e9326d9aaee...",
      "value": "0"
    },
    "createdAt": "2025-07-11T12:00:00.000Z"
  },
  "error": null
}
  • unsignedTransaction — Unsigned Ethereum transaction object (ready for signing).

2. Claim Withdrawn ETH

Once the withdrawal is claimable, generate and broadcast a claim transaction to return ETH to the user’s wallet.

Send a POST request to /api/v1/eth-pool/[network]/staking/claim

Example request (for hoodi network):

curl --request POST \
     --url https://api.p2p.org/api/v1/eth-pool/hoodi/staking/claim \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --data '{
       "stakerAddress": "0x092Af80778ff3c3D27Fd2744C39f6e9326d9AaEe",
       "vaultAddress": "0xba447498dc4c169f2b4f427b2c4d532320457e89"
     }'
  • unsignedTransaction — Unsigned Ethereum claim transaction.

What's Next?