Subscribe to events
curl --request GET \
--url https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/eventsimport requests
url = "https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events', 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://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"event: contribution_and_proof\ndata: {\"contribution\": \"...\", \"proof\": \"...\"}\n\n"{
"code": 123,
"message": "<string>"
}Ethereum Beacon Chain API
Subscribe to events
Subscribe to the Beacon Chain events and receive a stream of the following data: Event type (event: head): This specifies the type of event being streamed.
GET
/
0a9d79d93fb2f4a4b1e04695da2b77a7
/
eth
/
v1
/
events
Subscribe to events
curl --request GET \
--url https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/eventsimport requests
url = "https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events', 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://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://beacon-nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"event: contribution_and_proof\ndata: {\"contribution\": \"...\", \"proof\": \"...\"}\n\n"{
"code": 123,
"message": "<string>"
}This method will not work in the interactive section as it receives a continuous stream of data.You can test it using Postman:
Instructions:
- Event type (event:
head): This specifies the type of event being streamed. In this case, it’s a head event, which relates to the latest confirmed block on the Beacon Chain. - Data fields:
slot: The slot number at which this block was proposed. Slots are time periods during which a block can be proposed.block: The hash of the block that has been accepted as the head of the chain.state: The state root of the Ethereum network after processing this block.epoch_transition: A boolean indicating whether or not this block involved a transition between epochs.previous_duty_dependent_rootandcurrent_duty_dependent_root: These roots help in understanding the duties thatvalidators need to perform, which may vary from one epoch to another.execution_optimistic: A boolean indicating the execution mode. If false, it means the block is fully validated; if true, it implies the block is processed in an optimistic mode, where certain validations might be pending.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Query Parameters
Topics to subscribe to, e.g., 'head'
Response
Successfully subscribed to events
The response is of type string.
Example:
"event: contribution_and_proof\ndata: {\"contribution\": \"...\", \"proof\": \"...\"}\n\n"
Last modified on June 22, 2026
Was this page helpful?