3

I want to list all of my asset holder, what I'm doing now is streaming payment and save account that transaction using my asset.

Is there any other efficient way to do this?

3 Answers 3

3

There are few options, depends on how are you going to use this information.

Option 1

If you just want to explore your asset holders, use StellarExpert for this purpose. Open all assets dashboard, find your asset, navigate to it, and click the "Asset holders" tab. For example, check how this interface looks like for MOBI token.

Option 2

In case if you need to query your holders list frequently, you'll need to setup Stellar Core server. Once you get it up and running, you will be able to query this information directly from the database with any advanced filtering criteria suited for your case.

0

Looks like Stellar Expert has an API that can do this.

https://stellar.expert/openapi.html#operation/getAssetHolders

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 15, 2022 at 7:11
0

More efficient way is actually running your own Horizon node so you can access to the Horizon DB and query the data directly, you can get all the assets holders in one single query with the table trust_lines.

Now if you don't want or can't run your own horizon node, the Horizon API has an endpoint to get all of the accounts with a trustline open to your asset. The assets endpoint like this https://horizon-testnet.stellar.org/accounts/?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN...

But this is not that efficient so having the node is still way more efficient

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.