Withdrawal
The Pooled Staking API allows users to initiate and complete withdrawal of their staked ETH at any time.
Withdrawal is a two-step process due to the Ethereum exit queue and protocol constraints:
- Prepare the unstake transaction and submit it to the blockchain
- Withdraw unstaked tokens to the delegator’s wallet after the exit period ends.
Request examples are provided using cURL.
1. Prepare Unstake Transaction
-
Create the unstake request for a specific delegator and vault by sending a POST request to /api/v1/staking/pool/[network]/staking/withdraw.
Example request (for
hoodi
network):curl --request POST \ --url https://api.p2p.org/api/v1/staking/pool/[network]/staking/withdraw \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data '{ "delegatorAddress": "0x092Af80778ff3c3D27Fd2744C39f6e9326d9AaEe", "vaultAddress": "0xba447498dc4c169f2b4f427b2c4d532320457e89", "amount": 0.01 }'
delegatorAddress
— account address of the user initiating the withdrawal transaction.vaultAddress
— Ethereum address of the vault which keeps the tokens.amount
— amount of tokens in ETH to withdraw. The value must be decimal, e.g., 0.01.
Example response:
"error": null, "result": { "amount": 0.01, "vaultAddress": "0xba447498dc4c169f2b4f427b2c4d532320457e89", "delegatorAddress": "0x092Af80778ff3c3D27Fd2744C39f6e9326d9AaEe", "unsignedTransaction": { "serializeTx": "0x02f87683088bb0168459682f0084d16be71082d54e94ba447498dc4c169f2b4f427b2c4d532320457e8987f8b0a10e470000b844f9609f08000000000000000000000000092af80778ff3c3d27fd2744c39f6e9326d9aaee0000000000000000000000000000000000000000000000000000000000000000c0", "to": "0xba447498dc4c169f2b4f427b2c4d532320457e89", "data": "0xf9609f08000000000000000000000000092af80778ff3c3d27fd2744c39f6e9326d9aaee0000000000000000000000000000000000000000000000000000000000000000", "value": "10000000000000000", "nonce": 22, "chainId": 560048, "gasLimit": "54606", "type": 2, "maxFeePerGas": "3513509648", "maxPriorityFeePerGas": "1500000000" }, "createdAt": "2025-07-21T12:05:59.015Z" } }
amount
— amount of tokens in ETH to unstake.vaultAddress
— Ethereum address of the vault which keeps the tokens.delegatorAddress
— account address of the user initiating the unstake transaction.unsignedTransaction
— unsigned transaction in Base64 encrypted format. Sign the transaction and submit it to the blockchain to perform the called action.serializeTx
— serialized unsigned transaction.to
— recipient address for this transaction.data
— transaction data payload in the hexadecimal format.value
— amount this transaction is sending in Wei.nonce
— nonce of the transaction.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.gasLimit
— maximum gas limit for this block.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
createdAt
— timestamp of the transaction in the ISO 8601 format.
-
Use
unsignedTransaction
from the previous step to sign and send the signed transaction to the Ethereum network.
2) Prepare Withdrawal Transaction
Note that it takes up to 4 days to prepare your tokens for claiming as exiting validators from the Beacon Chain takes time. Withdrawal is only available after the exit period ends.
-
Once the tokens become claimable, prepare the withdrawal transaction to return ETH to the delegator’s wallet by sending a POST request to /api/v1/staking/pool/[network]/staking/claim.
Example request (for
hoodi
network):curl --request POST \ --url https://api.p2p.org/api/v1/staking/pool/hoodi/staking/claim \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "delegatorAddress": "0x092Af80778ff3c3D27Fd2744C39f6e9326d9AaEe", "vaultAddress": "0xba447498dc4c169f2b4f427b2c4d532320457e89", "amount": 10000 }'
delegatorAddress
— account address of the user initiating the withdrawal transaction.vaultAddress
— Ethereum address of the vault which keeps the tokens.amount
— amount of tokens in ETH to withdraw. The value must be decimal, e.g., 0.01.
Example response is the same as in the Prepare Unstake Transaction step.
-
Use
unsignedTransaction
from the previous step to sign and send the signed transaction to the Ethereum network.
What's Next?
- Sign and Send Transaction
- Pooled Staking API reference
Updated 9 days ago