3

I'm not sure how to get my delegators holding greater than a 50 tez balance.

I gather I need to filter by delegate and balance.

I see filter by balance would be:

?balance.gt=1234

But not sure how to combine this to return all delegators of a baker address.

2 Answers 2

2

https://api.tzkt.io/#operation/Accounts_GetDelegators is the best way to do that. You just need to filter you delegators with balance.gt=50000000.

Here's an example: https://api.tzkt.io/v1/accounts/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/delegators?balance.gt=50000000

1

You can query them like this: https://api.tzkt.io/v1/accounts?delegate=tz1irJKkXS2DBWkU1NnmFQx1c1L7pbGg4yhk&balance.gt=50000000&select=address,balance,delegate&limit=10000

Here,

  • delegate=tz1irJKkXS2DBWkU1NnmFQx1c1L7pbGg4yhk filters only those who delegate Coinbase Baker, replace the address with your own baker address.
  • balance.gt=50000000 filters only those whose balance is greater than 50 XTZ.
  • select=address,balance,delegate only gets address, balance, and delegate info.
  • limit=10000 returns at max 10000 items in the response, this is the maximum you can set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.