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 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.
unDelegateInfoThe unDelegateInfo contains a list with data about the unDelegated values.
timestampThe timestamp field represents the last moment of an interaction with the delegation contract.

The unDelegateInfo field is populated with the fields below:

unDelegateInfo fieldsDescription
valueThe value field holds the EGLD amount that was undelegated.
valueNumThe value field holds the EGLD amount that was undelegated, in a numeric format (example: 1.5).
timestampThe timestamp field represents the timestamp when the unDelegation operation was done.

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.."
}
}
}'