Beacon API
/eth/v1/validator/duties/attester/{epoch}
Get attester duties
POST
/
eth
/
v1
/
validator
/
duties
/
attester
/
{epoch}
Get attester duties
curl --request POST \
--url 'https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}' \
--header 'Content-Type: application/json' \
--data '[
"1"
]'import requests
url = "https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}"
payload = ["1"]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(['1'])
};
fetch('https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}', 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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}",
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([
'1'
]),
CURLOPT_HTTPHEADER => [
"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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}"
payload := strings.NewReader("[\n \"1\"\n]")
req, _ := http.NewRequest("POST", url, payload)
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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}")
.header("Content-Type", "application/json")
.body("[\n \"1\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n \"1\"\n]"
response = http.request(request)
puts response.read_body{
"dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"execution_optimistic": false,
"data": [
{
"pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
"validator_index": "1",
"committee_index": "1",
"committee_length": "1",
"committees_at_slot": "1",
"validator_committee_index": "1",
"slot": "1"
}
]
}{
"code": 400,
"message": "Invalid epoch: -2"
}{
"code": 500,
"message": "Internal server error"
}{
"code": 503,
"message": "Beacon node is currently syncing and not serving request on that endpoint"
}curl -X POST \
"https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/490000" \
-H "Content-Type: application/json" \
-d '["1", "2"]'
curl -X POST \
"https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/362000" \
-H "Content-Type: application/json" \
-d '["1", "2"]'
Body
application/json
An array of the validator indices for which to obtain the duties.
Minimum array length:
1Response
Success response
Get attester duties
curl --request POST \
--url 'https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}' \
--header 'Content-Type: application/json' \
--data '[
"1"
]'import requests
url = "https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}"
payload = ["1"]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(['1'])
};
fetch('https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}', 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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}",
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([
'1'
]),
CURLOPT_HTTPHEADER => [
"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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}"
payload := strings.NewReader("[\n \"1\"\n]")
req, _ := http.NewRequest("POST", url, payload)
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://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}")
.header("Content-Type", "application/json")
.body("[\n \"1\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/validator/duties/attester/{epoch}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n \"1\"\n]"
response = http.request(request)
puts response.read_body{
"dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"execution_optimistic": false,
"data": [
{
"pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
"validator_index": "1",
"committee_index": "1",
"committee_length": "1",
"committees_at_slot": "1",
"validator_committee_index": "1",
"slot": "1"
}
]
}{
"code": 400,
"message": "Invalid epoch: -2"
}{
"code": 500,
"message": "Internal server error"
}{
"code": 503,
"message": "Beacon node is currently syncing and not serving request on that endpoint"
}