algorand / go-algorand

Algorand's official implementation in Go.
https://developer.algorand.org/
Other
1.35k stars 473 forks source link

Get Accounts for AssetID #614

Closed rfustino closed 4 years ago

rfustino commented 4 years ago

It would be very useful to have a function in the REST API/SDKs to find all of the accounts that have a particular assetid.

For example, I could create an Algorand Blockchain game with a leader board. So, I need for find out which players (accounts) have my assetID for the game. I can then do a sort on the top 10 asset token holders to build my leader board.

It would be also useful for inventory purposes. Which accounts have how many assets?

algorotem commented 4 years ago

Hi there, this can be done with indexer v2/accounts?asset-id={assetID}