From a python script, I would like to query the beacon API and return the following values:
-
sum of balances for all validators where status = “active”
-
sum of balances for all validators where status = “waiting_in_queue”
-
sum of balances for all validators where status = “exited_voluntarily”
I only know that from the command line, I can obtain all of the necessary input by usingcurl http://127.0.0.1:5059/eth/v1/beacon/states/finalized/validators/ | jq '.[]'
Click here for the full story.