Skip to main content

delegators

This page describes the structure of the delegators index (Elasticsearch), and also depicts a few examples of how to query it.

_id

The _id field of this index is composed in this way: blake2bHash(delegatorAddress+stakingProviderAddress), in a base64 encoding (example: YZNG+r3ZwFtOj0c057MnpVnXAfmSqLai15lusLWg+KM=).

Fields

FieldDescription
addressThe address field holds the address in a bech32 encoding of the delegator.
contractThis field holds the bech32 encoded address of the staking provider contract to whom it was delegated to.
activeStakeThe activeStake field holds the EGLD amount of the active stake (not undelegated nor unbondable).
activeStakeNumThe activeStake field holds the EGLD amount of the active stake (not undelegated nor unbondable), in a numeric format. Example: 1.5.

Query examples

Fetch all delegations of an address

curl --request GET \
--url ${ES_URL}/delegators/_search \
--header 'Content-Type: application/json' \
--data '{
"query": {
"match": {
"address":"erd.."
}
}
}'

Fetch all delegators to a staking provider

curl --request GET \
--url ${ES_URL}/delegators/_search \
--header 'Content-Type: application/json' \
--data '{
"query": {
"match": {
"contract":"erd.."
}
}
}'