Ethereum
Create Staking Increment Request
Set up a new increment request to increase the validator’s stake. For validators using 0x02 type of withdrawal credentials.
POST
/
api
/
v1
/
eth
/
staking
/
direct
/
increment-request
/
create
Create Staking Increment Request
curl --request POST \
--url https://api.p2p.org/api/api/v1/eth/staking/direct/increment-request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "8c48cd8d-99cb-4149-8975-f0822fe46d06",
"pubkeys": [
"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"
],
"amountPerValidator": "1000000000",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
}
'import requests
url = "https://api.p2p.org/api/api/v1/eth/staking/direct/increment-request/create"
payload = {
"id": "8c48cd8d-99cb-4149-8975-f0822fe46d06",
"pubkeys": ["0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"],
"amountPerValidator": "1000000000",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
}
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: '8c48cd8d-99cb-4149-8975-f0822fe46d06',
pubkeys: [
'0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39'
],
amountPerValidator: '1000000000',
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb'
})
};
fetch('https://api.p2p.org/api/api/v1/eth/staking/direct/increment-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/increment-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' => '8c48cd8d-99cb-4149-8975-f0822fe46d06',
'pubkeys' => [
'0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39'
],
'amountPerValidator' => '1000000000',
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb'
]),
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/increment-request/create"
payload := strings.NewReader("{\n \"id\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\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/increment-request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/eth/staking/direct/increment-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\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\n}"
response = http.request(request)
puts response.read_body"<unknown>"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Arbitrary UUID. You can later use that UUID to check the status of the increment operation.
Example:
"8c48cd8d-99cb-4149-8975-f0822fe46d06"
List of validator public keys.
Pattern:
^0x[a-fA-F0-9]{96}$Example:
[
"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"
]
Amount of tokens in Gwei to stake per validator.
Required range:
1000000000 <= x <= 2016000000000Example:
"1000000000"
Withdrawal address for the validators.
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
Response
OK
The response is of type any.
Create Staking Increment Request
curl --request POST \
--url https://api.p2p.org/api/api/v1/eth/staking/direct/increment-request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "8c48cd8d-99cb-4149-8975-f0822fe46d06",
"pubkeys": [
"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"
],
"amountPerValidator": "1000000000",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
}
'import requests
url = "https://api.p2p.org/api/api/v1/eth/staking/direct/increment-request/create"
payload = {
"id": "8c48cd8d-99cb-4149-8975-f0822fe46d06",
"pubkeys": ["0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"],
"amountPerValidator": "1000000000",
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb"
}
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: '8c48cd8d-99cb-4149-8975-f0822fe46d06',
pubkeys: [
'0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39'
],
amountPerValidator: '1000000000',
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb'
})
};
fetch('https://api.p2p.org/api/api/v1/eth/staking/direct/increment-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/increment-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' => '8c48cd8d-99cb-4149-8975-f0822fe46d06',
'pubkeys' => [
'0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39'
],
'amountPerValidator' => '1000000000',
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb'
]),
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/increment-request/create"
payload := strings.NewReader("{\n \"id\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\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/increment-request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/eth/staking/direct/increment-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\": \"8c48cd8d-99cb-4149-8975-f0822fe46d06\",\n \"pubkeys\": [\n \"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39\"\n ],\n \"amountPerValidator\": \"1000000000\",\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\"\n}"
response = http.request(request)
puts response.read_body"<unknown>"