8

Is it possible to view the set of accounts that vote for any given inflation destination?

For example, this is a popular inflation destination. How can I fetch a list of accounts that have voted for this destination?

2 Answers 2

11

If you did not want to rely on a 3rd party to gather this data you could run a stellar node and query the postgres database directly.

https://github.com/stellar/stellar-core/blob/d6fc518b80afa9731557120f831df06b592db1b0/src/ledger/AccountFrame.cpp#L232

I have used the stellar-core code above to give an idea of the query you would need to run.

db.getPreparedStatement("SELECT accountid, balance, inflationdest "
                        "FROM accounts WHERE inflationdest = :inflationdest");
4

You can use fed.netwok's inflation public API endpoint to get the list of accounts that has voted for an inflation destination. In your case the URL would be:

https://fed.network/inflation/GCCD6AJOYZCUAQLX32ZJF2MKFFAUJ53PVCFQI3RHWKL3V47QYE2BNAUT

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.