Staking API Reference
Get Validators
Retrieves a list of validators established by the user.
GET
/
v1
/
api
/
ethereum
/
{network}
/
validators
cURL
curl --request GET \
--url https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators \
--header 'Authorization: Bearer <token>'import requests
url = "https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators', 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://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"created_at": "2023-07-21T20:33:24Z",
"index": 112948,
"public_key": "0x80002a239517f5034e51bccb897f783eb38147538b661e2c870c302cbefa48d86178a0f8ffdf75eb9f07e0afdfef3cd2",
"rewards": {
"all": 267626726,
"last_30_days": 120272088,
"last_365_days": 267626726
},
"status": "active_ongoing",
"withdrawal_address": "0x86008d099756bf129d332d0a923311e935ba936075"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The network
Available options:
mainnet, hoodi Response
OK
The date and time when the validator was created.
Example:
"2023-07-21T20:33:24Z"
The index of the validator.
Example:
112948
The public key of the validator.
Example:
"0x80002a239517f5034e51bccb897f783eb38147538b661e2c870c302cbefa48d86178a0f8ffdf75eb9f07e0afdfef3cd2"
Show child attributes
Show child attributes
The status of the validator.
Example:
"active_ongoing"
The address where the rewards will be sent. Upon exiting, the initial deposit will also be withdrawn to this address.
Example:
"0x86008d099756bf129d332d0a923311e935ba936075"
cURL
curl --request GET \
--url https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators \
--header 'Authorization: Bearer <token>'import requests
url = "https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators', 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://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ethereum-staking.sprd.validationcloud.io/v1/api/ethereum/{network}/validators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"created_at": "2023-07-21T20:33:24Z",
"index": 112948,
"public_key": "0x80002a239517f5034e51bccb897f783eb38147538b661e2c870c302cbefa48d86178a0f8ffdf75eb9f07e0afdfef3cd2",
"rewards": {
"all": 267626726,
"last_30_days": 120272088,
"last_365_days": 267626726
},
"status": "active_ongoing",
"withdrawal_address": "0x86008d099756bf129d332d0a923311e935ba936075"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}