#querying self-bonds programmatically
1 messages ยท Page 1 of 1 (latest)
so i am trying to query self stake using the indexer and endpoints present on the swagger
but i dont see anything that outputs self stake
Okay thanks
querying self-bonds programmatically
you are trying to query self stake of a validator?
yes
A query like this for a validator's address would show the self-bonds:
https://indexer.mainnet.siuuu.click/api/v1/pos/bond/{validator_address}
But many validators may not necessarily have self-bonds from tokens delegated directly from their validator account. Many validators may also be staking some of their own tokens through a different non-validator address
The genesis files here can give you an idea of which validators "self-bonded" at genesis using a different non-validator address: https://github.com/namada-net/namada-mainnet-genesis/tree/main/genesis
do you mind sharing which instance you're using? is this what you're referring to?
https://namada-net.github.io/namada-indexer/#/default/get_api_v1_pos_bond__address_
the self stake addr during genesis was different so was getting empty output.
thanks again.