SSV
Create SSV Request
Set up a request for running a distributed validator and making a stake.
POST
/
api
/
v1
/
eth
/
staking
/
ssv
/
request
/
create
Create SSV Request
curl --request POST \
--url https://api.p2p.org/api/v1/eth/staking/ssv/request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"ssvOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"type": "without-encrypt-key",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"operationPeriodInDays": 365,
"ecdhPublicKey": null
}
'import requests
url = "https://api.p2p.org/api/v1/eth/staking/ssv/request/create"
payload = {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"ssvOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"type": "without-encrypt-key",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"operationPeriodInDays": 365,
"ecdhPublicKey": None
}
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,
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
feeRecipientAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
ssvOwnerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
type: 'without-encrypt-key',
amountPerValidator: '32000000000',
withdrawalCredentialsType: '0x02',
operationPeriodInDays: 365,
ecdhPublicKey: null
})
};
fetch('https://api.p2p.org/api/v1/eth/staking/ssv/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/v1/eth/staking/ssv/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,
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'feeRecipientAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'ssvOwnerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'type' => 'without-encrypt-key',
'amountPerValidator' => '32000000000',
'withdrawalCredentialsType' => '0x02',
'operationPeriodInDays' => 365,
'ecdhPublicKey' => null
]),
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/v1/eth/staking/ssv/request/create"
payload := strings.NewReader("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\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/v1/eth/staking/ssv/request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/v1/eth/staking/ssv/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 \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\n}"
response = http.request(request)
puts response.read_body"<unknown>"Authorizations
Body
application/json
Response
OK
The response is of type any.
Create SSV Request
curl --request POST \
--url https://api.p2p.org/api/v1/eth/staking/ssv/request/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"ssvOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"type": "without-encrypt-key",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"operationPeriodInDays": 365,
"ecdhPublicKey": null
}
'import requests
url = "https://api.p2p.org/api/v1/eth/staking/ssv/request/create"
payload = {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validatorsCount": 1,
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"feeRecipientAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"ssvOwnerAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"type": "without-encrypt-key",
"amountPerValidator": "32000000000",
"withdrawalCredentialsType": "0x02",
"operationPeriodInDays": 365,
"ecdhPublicKey": None
}
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,
withdrawalAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
feeRecipientAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
ssvOwnerAddress: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
type: 'without-encrypt-key',
amountPerValidator: '32000000000',
withdrawalCredentialsType: '0x02',
operationPeriodInDays: 365,
ecdhPublicKey: null
})
};
fetch('https://api.p2p.org/api/v1/eth/staking/ssv/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/v1/eth/staking/ssv/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,
'withdrawalAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'feeRecipientAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'ssvOwnerAddress' => '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb',
'type' => 'without-encrypt-key',
'amountPerValidator' => '32000000000',
'withdrawalCredentialsType' => '0x02',
'operationPeriodInDays' => 365,
'ecdhPublicKey' => null
]),
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/v1/eth/staking/ssv/request/create"
payload := strings.NewReader("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\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/v1/eth/staking/ssv/request/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"validatorsCount\": 1,\n \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/v1/eth/staking/ssv/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 \"withdrawalAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"feeRecipientAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"ssvOwnerAddress\": \"0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb\",\n \"type\": \"without-encrypt-key\",\n \"amountPerValidator\": \"32000000000\",\n \"withdrawalCredentialsType\": \"0x02\",\n \"operationPeriodInDays\": 365,\n \"ecdhPublicKey\": null\n}"
response = http.request(request)
puts response.read_body"<unknown>"