Delegator
Get Delegator Stake
Get a current delegator stake.
Ethereum: stake is the total balance and includes ETH still in the deposit or activation queue. When grouping by day, activeStake and inactiveStake break that total down into stake already active on the Beacon Chain and stake still waiting to be activated.
Historical Ethereum data is available from 2024-01-01; earlier history is not backfilled yet.
GET
/
api
/
v1
/
{network}
/
data
/
delegator
/
stakes
Get Delegator Stake
curl --request GET \
--url https://api.p2p.org/api/v1/{network}/data/delegator/stakes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.p2p.org/api/v1/{network}/data/delegator/stakes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.p2p.org/api/v1/{network}/data/delegator/stakes', 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/{network}/data/delegator/stakes",
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://api.p2p.org/api/v1/{network}/data/delegator/stakes"
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://api.p2p.org/api/v1/{network}/data/delegator/stakes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/v1/{network}/data/delegator/stakes")
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{
"error": null,
"result": {
"limit": 50,
"offset": 0,
"startAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"list": [
{
"stakingPeriod": "<string>",
"stakingPeriodStart": "<string>",
"stakingPeriodEnd": "<string>",
"stake": 123,
"stakeUsd": 123,
"tokenPrice": 123,
"currency": "<string>",
"activeStake": 123,
"inactiveStake": 123,
"validator": "<string>"
}
]
}
}Authorizations
Path Parameters
Query Parameters
Delegator address type in the required network:
- `deposit` — available for the Ethereum network (used by default)
- `withdrawal` — available for the Ethereum network
- `delegator` — available for the Polygon, Solana, Cosmos, Near, and Sui networks (used by default)
- `stake_account` — available for the Solana
- `nominator` — available for the TON and Polkadot networks (used by default)
- `nominator_reward_account` — available for the Polkadot networks
Available options:
deposit, withdrawal, nominator, nominator_reward_account, delegator, stake_account Get Delegator Stake
curl --request GET \
--url https://api.p2p.org/api/v1/{network}/data/delegator/stakes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.p2p.org/api/v1/{network}/data/delegator/stakes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.p2p.org/api/v1/{network}/data/delegator/stakes', 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/{network}/data/delegator/stakes",
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://api.p2p.org/api/v1/{network}/data/delegator/stakes"
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://api.p2p.org/api/v1/{network}/data/delegator/stakes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/v1/{network}/data/delegator/stakes")
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{
"error": null,
"result": {
"limit": 50,
"offset": 0,
"startAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"list": [
{
"stakingPeriod": "<string>",
"stakingPeriodStart": "<string>",
"stakingPeriodEnd": "<string>",
"stake": 123,
"stakeUsd": 123,
"tokenPrice": 123,
"currency": "<string>",
"activeStake": 123,
"inactiveStake": 123,
"validator": "<string>"
}
]
}
}