Ethereum
Unified API + Ethereum Integration Workflow
In the following guide, the integration process for the eth-ssv chain is covered. The Ethereum SSV On-Chain integration aligns with the general Unified API process but with network-specific parameters.
Get an authentication token to start using the Unified API.
Request examples are provided using cURL.
To check the integration guides for other chains, refer to the Networks Supported section.
Key Ethereum-specific details
chain— always set toeth_ssvfor Ethereum-related requests.network— environment in which the transaction is processed:testnetormainnet.stakerAddress— account address initiating staking, unstaking or withdrawal transactions.
Staking flow
1. Create staking request
Send a POST request to /api/v1/unified/staking/stake.
Example request (for testnet network):
curl --request POST \
--url https://api-test.p2p.org/api/v1/unified/staking/stake \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"chain": "eth_ssv",
"network": "testnet",
"stakerAddress": "0x136C861fC99d1624155f5FC8A06Bac79ED8547B1",
"amount": 32,
"extra": {
"withdrawalAddress": "0x136C861fC99d1624155f5FC8A06Bac79ED8547B1",
"amountPerValidator": "32",
"withdrawalCredentialsType": "0x02"
}
}'chain— blockchain network, always set toeth_ssvfor Ethereum-related requests.network— environment in which the transaction is processed:testnetormainnet.stakerAddress— account address initiating the staking transaction.amount— amount of tokens to stake in ETH.extra— additional parameters:withdrawalAddress— withdrawal address for the validators.amountPerValidator— amount of tokens to stake in Gwei per validator.withdrawalCredentialsType— withdrawal credentials preferred format:0x01or0x02.
Example response:
{
"error": null,
"result": {
"amount": "32000000000000000000",
"stakerAddress": "0x136C861fC99d1624155f5FC8A06Bac79ED8547B1",
"unsignedTransactionData": "0x02f9023882426880830f42408463aeabb88398968094e9dfc1850110dadf68402ec6ad2b9bdfb79807338901bc16d674ec800000b90204746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000e8ffb2afa84510d1814e8d74478b71041c42db7fe128144fdd7a268bf448ba856345ad5b70b23bae824295c393fa1df1d3dcc203112022ca0cfe23b069877d20ea1e5dd64fffec475f7b0d0200182525b28bf76e1e6110ba0db5edd87b39799b7d01bceefe4af93f0a94fac12291a9f0b5b093fb11c220581de0ff2e20f126105918e2b27ed42c9bccda8e949d0bc0ff8be8c4a57741db21c30ff2fefdce7ecf8722ea53db9800d6612c4f0a81a54334b6ab08f52dd6c28f5f363dd5a59a1bab46e2a2fc30bf2c83ae388fa15e0faf4a3d2da85b1b8a180b77906286eaf4443d9e4825a7df8a7cf940000000000000000000000000000000000000000000000000c0",
"extraData": {
"to": "0xE9DfC1850110DadF68402Ec6AD2B9bDfB7980733",
"gasLimit": "10000000",
"data": "0x746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000e8ffb2afa84510d1814e8d74478b71041c42db7fe128144fdd7a268bf448ba856345ad5b70b23bae824295c393fa1df1d3dcc203112022ca0cfe23b069877d20ea1e5dd64fffec475f7b0d0200182525b28bf76e1e6110ba0db5edd87b39799b7d01bceefe4af93f0a94fac12291a9f0b5b093fb11c220581de0ff2e20f126105918e2b27ed42c9bccda8e949d0bc0ff8be8c4a57741db21c30ff2fefdce7ecf8722ea53db9800d6612c4f0a81a54334b6ab08f52dd6c28f5f363dd5a59a1bab46e2a2fc30bf2c83ae388fa15e0faf4a3d2da85b1b8a180b77906286eaf4443d9e4825a7df8a7cf940000000000000000000000000000000000000000000000000",
"chainId": 17000,
"type": 2,
"maxFeePerGas": "1672391608",
"maxPriorityFeePerGas": "1000000"
}
}
}amount— amount of tokens to stake denominated in Gwei (1 ETH = 10⁻⁹ Gwei)stakerAddress— staking account address receiving the staked tokens.unsignedTransactionData— raw transaction hex string. To be signed and broadcasted.extraData— additional transaction details:to— recipient address for this transaction.gasLimit— maximum gas limit for this block.data— transaction data.chainId— chain ID this transaction is authorized on, as specified by EIP-155.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.
2. Sign and send transaction
Use unsignedTransactionData to sign the transaction, following the Ethereum-specific signing logic.
To broadcast the signed transaction to the Ethereum network, send a POST request to /api/v1/eth/transactions.
curl --request POST \
--url 'https://api-test.p2p.org/api/v1/unified/transaction/broadcast' \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
--header 'content-type: application/json' \
--data '{
"chain": "eth_ssv",
"network": "testnet",
"signedTransaction": "0x02f9...",
"stakerAddress": "0xeE6FFB3fEf95AdA9b4FA606C2Ef90A31D37b6AdB"
}'network— environment in which the transaction is processed:testnetormainnet.signedTransaction— signed transaction which needs to be broadcast to the network.
Example response:
{
"error": null,
"result": {
"status": "pending",
"extraData": {
"broadcastedAt": "2026-03-02T07:34:18.278Z",
"transactionHash": "0x27b0cb18f0001e9d10aea41a4bcf5cb8e77d97d1b48d7319d21aea7250cea12a",
"gas": {}
}
}
}status— transaction status:pending,success.extraData— additional transaction details:broadcastedAt— time of transaction being broadcasted.transactionHash— hash of the transaction.gas— gas consumed to broadcast transaction.
Unstaking flow
1. Create withdrawal request
Send a POST request to /api/v1/unified/staking/withdraw.
Example request (for testnet network):
curl --request POST \
--url https://api-test.p2p.org/api/v1/unified/staking/withdraw \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"chain": "eth_ssv",
"network": "testnet",
"stakerAddress": "0x136C861fC99d1624155f5FC8A06Bac79ED8547B1",
"extra": {
"publicKeys": [ "0x88D461F02A8CBD2B81E39A98318E11724C6CDAA05A7AE8AD318AD29989AB693034209B37B7150BCE00D268163F58360D"
],
"withdrawalAddress": "0x136C861fC99d1624155f5FC8A06Bac79ED8547B1"
}
}'chain— blockchain network.network— environment in which the transaction is processed:testnetormainnet.stakerAddress— account address initiated the staking transaction.extra— additional request parameters:publicKeys— list of validators public keys.withdrawalAddress— withdrawal address for the validators.
Example response:
{
"error": null,
"result": {
"extraData": {
"list": [
{
"serializeTx": "0x02f901ae82426880830f4240830f432c83989680947d5a8de7e3721f6692d88a8d30b9c927fffcdbb480b9018432afd02f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003083340b237f8f07cc3569b94d66e1c1616c5d96ec1f57c75bb81d824eead70f1aa4ffae2dbb32b7aebe8e6bc9dc40eb9c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000050d000000000000000000000000000000000000000000000000000000000000051000000000000000000000000000000000000000000000000000000000000005130000000000000000000000000000000000000000000000000000000000000516c0",
"to": "0x7D5a8De7E3721F6692d88A8D30B9C927fffcDBb4",
"gasLimit": "10000000",
"data": "0x32afd02f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003083340b237f8f07cc3569b94d66e1c1616c5d96ec1f57c75bb81d824eead70f1aa4ffae2dbb32b7aebe8e6bc9dc40eb9c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000050d000000000000000000000000000000000000000000000000000000000000051000000000000000000000000000000000000000000000000000000000000005130000000000000000000000000000000000000000000000000000000000000516",
"value": "0",
"chainId": 17000,
"type": 2,
"maxFeePerGas": "1000236",
"maxPriorityFeePerGas": "1000000"
}
]
}
}
}serializeTx— raw transaction hex string. To be signed and broadcasted.to— recipient address for this transaction.gasLimit— maximum gas limit for this block.data— transaction data.value— transaction value.chainId— chain ID this transaction is authorized on, as specified by EIP-155.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.
2. Sign and send transaction
Use unsignedTransactionData to sign and send the transaction following the Ethereum-specific signing logic.
Smart contracts
Mainnet 0x5ed861aec31cCB496689FD2E0A1a3F8e8D7B8824
Hoodi 0x2444fae9394deBF503775940AF2a3e9364A31e34
What's next?
Updated 6 days ago