Create Staking Request
Set up nodes for staking using P2P infrastructure.
curl --request POST \
--url https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"nodesOptions": {
"location": "any",
"relaysSet": null
},
"type": "REGULAR",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"eigenPodOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"controllerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585"
}
'import requests
url = "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create"
payload = {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"nodesOptions": {
"location": "any",
"relaysSet": None
},
"type": "REGULAR",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"eigenPodOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"controllerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
validatorsCount: 1,
nodesOptions: {location: 'any', relaysSet: null},
type: 'REGULAR',
amountPerValidator: '32000000000',
withdrawalCredentialsType: '0x02',
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
eigenPodOwnerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
controllerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
feeRecipientAddress: '0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585'
})
};
fetch('https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'validatorsCount' => 1,
'nodesOptions' => [
'location' => 'any',
'relaysSet' => null
],
'type' => 'REGULAR',
'amountPerValidator' => '32000000000',
'withdrawalCredentialsType' => '0x02',
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'eigenPodOwnerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'controllerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'feeRecipientAddress' => '0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create"
payload := strings.NewReader("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Arbitrary UUID. You can later use that UUID to check the status of the set-up operation.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Number of validators: each validator stakes from 32 to 2048 ETH.
1 <= x <= 31251
Configuration options for the requested validator nodes.
Show child attributes
Show child attributes
Type of the node request.
REGULAR, RESTAKING, MANAGED_SSV "REGULAR"
Amount of tokens in Gwei to stake per validator.
"32000000000"
Withdrawal credentials type.
0x01, 0x02 "0x02"
Withdrawal address for the validators.
^0x[a-fA-F0-9]{40}$"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
EigenPod owner address.
^0x[a-fA-F0-9]{40}$"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
Controller address for the validators.
^0x[a-fA-F0-9]{40}$"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
Fee recipient address.
^0x[a-fA-F0-9]{40}$"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585"
Response
OK
The response is of type any.
curl --request POST \
--url https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"nodesOptions": {
"location": "any",
"relaysSet": null
},
"type": "REGULAR",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"eigenPodOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"controllerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585"
}
'import requests
url = "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create"
payload = {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"nodesOptions": {
"location": "any",
"relaysSet": None
},
"type": "REGULAR",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"eigenPodOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"controllerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
validatorsCount: 1,
nodesOptions: {location: 'any', relaysSet: null},
type: 'REGULAR',
amountPerValidator: '32000000000',
withdrawalCredentialsType: '0x02',
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
eigenPodOwnerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
controllerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
feeRecipientAddress: '0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585'
})
};
fetch('https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'validatorsCount' => 1,
'nodesOptions' => [
'location' => 'any',
'relaysSet' => null
],
'type' => 'REGULAR',
'amountPerValidator' => '32000000000',
'withdrawalCredentialsType' => '0x02',
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'eigenPodOwnerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'controllerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'feeRecipientAddress' => '0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create"
payload := strings.NewReader("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/eth/staking/direct/nodes-request/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"nodesOptions\": {\n \"location\": \"any\",\n \"relaysSet\": null\n },\n \"type\": \"REGULAR\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"eigenPodOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"controllerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585\"\n}"
response = http.request(request)
puts response.read_body